comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Avoid loop in matrix operation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Avoid loop in matrix operation [message #49226] Thu, 06 July 2006 03:41
L. Testut is currently offline  L. Testut
Messages: 16
Registered: January 2006
Junior Member
Hi everybody,
My question is very generic. How can I make operation on a matrix
whitout using loop ?
Here is an example, where I have, for example a topographic map
changing with time H(i,j,t), and I want to know the mean topography. I
did that and it works well:

FOR i=0,Nx-1 DO BEGIN
FOR j=0,Ny-1 DO BEGIN
H(i,j)=MEAN(H(i,j,*))
ENDFOR
ENDFOR

But I like one-line code. Is it possible to do the same thing in a more
efficient and compact way ?

I'm sure you have an answer for me !
thanks
Laurent
[Message index]
 
Read Message
Previous Topic: ESRI Shapefiles
Next Topic: Objects and Widgets

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:34:34 PDT 2025

Total time taken to generate the page: 0.87538 seconds