Subchapters:
|
Working with arraysThe < and > symbols will perform a min and max on a table, useful if you have to take the log of a table where negative values could be: IDL>
print,sin(tab1) Here we will substitute all the value lower than 0.0001 by 0.0001: IDL>
print,sin(tab1) > 0.0001 Now we can take the log of the table, without errors (but you have to deal with the -9.12... value.): IDL>
print,alog(sin(tab1) > 0.0001) We can choose to work on a subset of tab1, where the values are > 0., see next Chapter about the "where" function. If you want to compare 2 arrays, you can always overplot them on the same plot, but you cannot, for ex., subtract one to the other unless you rebin them: IDL> x1 =
findgen(200)/199. see also interpolate. |
IDL courses C. Morisset © 2004 IA/UNAM V 2.2 |