Subchapters:
|
Working with arraysThe size function return information on the size(s) and type of the arrays, and the n_elements will just return the total number of element in an array: IDL>
print,size(tab1) Here 2 is the number of dimension, 3 and 3 are the number of rows and columns, 4 indicates the type of data (here floating point) and 9 is the total number of elements, also available by: IDL>
print,n_elements(tab1) You can perform operations on the arrays WITHOUT using loops: IDL> vec2
= vec1^2 |
IDL courses C. Morisset © 2004 IA/UNAM V 2.2 |