any one knows if there is a way to do 'do not print/export this cell' option? I wanted to ask this in main board, but thought to check here first. Basically, I want export a notebook to PDF, but some cells, I do not want them exported. Currently what I do, is go select all the cells, and check Cell->CellProperties->Open so they are closed, then export, then uncheck them again if I need to see them and make more changes. This is very tedious.
...it will be better to select the cell, and mark it once 'do not print/export' but keep it open for editing as needed. This way, it is done once and one does not have to keep opening and closing cells manually.
I have a question regarding arrays. I have created a matrix say time (1x130) from which I want to import elements into an array say time_t. How should I achieve this.?
I would like to add all the elements from a matrix into an array so that I can access each element as time_t[1,2]... and perform operations on them to get a new array.
Can you specify one of the ways for e.g.. a 2 matrices say time= {0,1,2...130} and mean={1.2,4.5,...}, whose elements need to be transferred into 2 arrays say time_t and mean_t
so that I can perform operations on the mean_t and time_t arrays to get new arrays(values) say time_t1 and mean_t1
@Pawan We have a communication problem I think, because we're used to different terminology. In Mathematica an array is a list, and a matrix (in some languages a two dimensional array) is a list of lists. What you call a matrix (time={1,2,3,4}) I would just call a list. A matrix could be time={{1,2},{3,4}}. I don't know what you mean when you say you want to transfer a matrix into an array. If you have a matrix m={{1,2},{3,4}} you can already access its members the way you describe.
Consider m[[1,2]] for example. That will give you second column on the first row. If you want to create a copy of a matrix, just do m2=m. If you want to perform operations on the elements and then put the result in a new variable you can just do m3 = Map[Norm,m2] which will take the 2-norm of each row and then return a list of those values. Or m3=2 m will duplicate each value, for example.
@Pawan Well, I understood that from your example so that wasn't exactly the problem, but rather the way that you seemed to distinguish between a column matrix and an array when arrays aren't a data structure in Mathematica. An array is a list. A matrix is a list. So what do you mean when you say you want to transfer a matrix into an array? It's like saying "I want to transfer a list into a list" - that's why I can't understand you.
@Silvia thanks, but I am not sure I understand what I need to do. What you can specify it in the stylesheet means and what to change in the UI. what I want, is select any normal input cell, and tell M, somehow, to mark this cell is non-printable, and non-exportable. (non-print is not important, as I only export to pdf any way). If you think this is useful and know how to do it, I can post a question on main site and you could answer it?
@Nasser I mean you can use the option CellOpen -> False on, say, Input/Printout style. So before exporting, you can convert the screen environment to Printout first.
@Silvia ok, thanks. I am actually only interested in export. I added printing as an extra. I am not following you with the example. Ok, lets make it simple: I have a notebook with 3 cells. I want only the first cell and the last cell to show in the PDF file. Currently, before I export to pdf, I select second cell and close it. Then export notebook to pdf. Then select the second cell, and open it.
@Silvia marking the cell manually once, not to export, is not a problem, I can do this. I just want to avoid having to select all cells I do not want to export, close them, then open it. Using cell tag+command sound good idea. Your second idea of copying the whole note etc.. sounds too much work. I really think M should better support this from the UI with new cell property
@Silvia I have to copy the notebook data to new open notebook, then have to save it with new name, then have to tell it to delete all cells tagged X, then export to pdf, then close the new notebook, then go rename the PDF file to what I want to match the orginal notebook name. etc... too much manual work.