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

Home » Public Forums » archive » Re: avoiding for loop when calculating median
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: avoiding for loop when calculating median [message #10962 is a reply to message #10952] Fri, 30 January 1998 00:00 Go to previous message
Michael Werger is currently offline  Michael Werger
Messages: 34
Registered: May 1997
Member
George McCabe wrote:

> for cnt=0,idim-1 do begin
> calcmedian(cnt)=median(mat(cnt,*))
> end
> ...
>
> can it be done wothout a FOR loop?
>
> Thank you, George
>
> ....

If it is only due to speed that you do not want to use the FOR loop,
just write it in a single line:
for cnt=0, idim-1 do calcmedian(cnt) = median(mat(cnt,*))


--
Michael Werger ESA ESTEC & Praesepe B.V.
Astrophysics Division mwerger@estec.esa.nl
Postbus 299 http://astro.estec.esa.nl
2200 AG Noordwijk +31 71 565 3783 (Voice)
The Netherlands +31 71 565 4690 (FAX)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: LMFIT -- stay away from it!
Next Topic: REAL DATA

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

Current Time: Thu Oct 09 22:36:48 PDT 2025

Total time taken to generate the page: 1.11402 seconds