Array<double> x; // x contains 1000 values, ranging from 0 to 10 x = dindgen(1000)/100; // now, we save x and sin(x) in the file "sine.txt" write("sine.txt","x= "+x+" ,y= "+sin(x));
x= 0 ,y= 0 x= 0.01 ,y= 0.00999983 x= 0.02 ,y= 0.0199987 ...
Array<double> x,y; Array<string> s; s = read("sine.txt"); x = getField<double>(s,2); y = getField<double>(s,4); plot(x,y);
-int: version, 0 at that stage -int: object type, 1 for Array, -int: element type -char[32]: name -char[256]: comments -int: element size (sizeof(T)) -unsigned char: number of dimensions (usually six) -long[# of dim]: dimension of the array -data buffer