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

Home » Public Forums » archive » saving arrays within loop
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: saving arrays within loop [message #53706 is a reply to message #53593] Tue, 24 April 2007 09:29 Go to previous message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
> for i=0,n_elements(stations)-1 do begin
> temp=fltarr(n_elements(stations),dim)
> endfor

You are re-declaring (filling with zeroes) your output array on each
pass through the loop. This is why only the last value is stored.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: surface vs. shade_surf
Next Topic: Re: error reading a large number of binary files

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

Current Time: Fri Oct 10 17:44:00 PDT 2025

Total time taken to generate the page: 1.43985 seconds