[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you get rid of for-loops with arrays
Karri Kaksonen wrote:
> I have tried to understand how to use the arrays in IDL but
> there is still tons of techniques that I don't know...
> Is it possible to do this without for-loops?
> a = [[1,2,3],[4,5,6]]
> b = [2,2,3]
> for i=0,1 do a[*,i] = a[*,i] * b
Redimensioning arrays in calculations is so important, it's in the FAQ:
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|