Re: orthogonal array projections [message #7535] |
Thu, 21 November 1996 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Deb Summa <summa@lanl.gov> writes:
> I'm trying to make a 2-d projection of max amplitude in a 3-d image
> array. The following bit of Fortran-esque code does what i want,
> but it's excruciatingly slow:
>
> for k=0,n-1 do begin
> for l=0,z-1 do begin
> ayz(k,l)=max(image(low:hi,k,l)
> endfor
> endfor
>
> Is there a way to do this without using loops?
Just off-hand, here is one thing you might try to speed things
up. This will return the maximun value in each column of numbers
between low and hi.
FOR j=low, hi DO BEGIN
ayz(*,*) = ayz(*,*) > image(j, *,*)
END
David
*************************************************
* David Fanning, Ph.D.
* 2642 Bradbury Court, Fort Collins, CO 80521
* Phone: 970-221-0438 Fax: 970-221-4762
* E-Mail: davidf@dfanning.com
*
* Sometimes I go about pitying myself, and all along my
* soul is being blown by great winds across the sky.
* -- Ojibway saying
************************************************
|
|
|