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

Home » Public Forums » archive » reversing calculation order
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: reversing calculation order [message #4190 is a reply to message #4087] Fri, 05 May 1995 00:00 Go to previous message
amaravad is currently offline  amaravad
Messages: 11
Registered: September 1994
Junior Member
Is there an IDLized way to compute the cummulative sum of an array.

func=findgen(N)
cumm_sum=fltarr(N)
for i=0,N-1 do cumm_sum(i)=total(func(0:i))

How can I eliminate the for loop in the above code.

thanks

ratty
--
Ratnakar Amaravadi Software/Hardware Engineer
Department of Radiology I.U. School of Medicine
(317)274-1843 (w) amaravad@indiana.edu
(317)274-4074 (fax) ratty@foyt.indyrad.iupui.edu
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Envi ROI Spectral/Bandmath
Next Topic: Is there an emacs mode??

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

Current Time: Sat Oct 11 02:23:27 PDT 2025

Total time taken to generate the page: 0.80090 seconds