[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Max value vector
Thomas C. Stubbings wrote:
> What I would need is something like the MATLAB command max(i) where i is an
> array(n,m) and max(i) returns a vector containing the maximum value of each
> column. The IDL max command only returns a scalar containing the absolute
> maximum of the array.
Try Craig Markwardt's CMAPPLY at
http://cow.physics.wisc.edu/~craigm/idl/idl.html#cmapply
> I even tried a big loop running through each column to find the max of each,
> but IDL doesnt accept loops with 64000 iterations
In fact IDL *does* accept loops with 64000 iterations; you just need to
make sure your loop variable is of LONG type, e.g.
for i = 0L, 64000L do begin
if (i mod 1000L) eq 0L then print, i
endfor
Cheers,
Liam.
--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley