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

Home » Public Forums » archive » For loop - Question
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: For loop - Question [message #89990 is a reply to message #89989] Tue, 13 January 2015 06:44 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den tisdag 13 januari 2015 kl. 15:02:48 UTC+1 skrev g.na...@gmail.com:
> Hi
>
> I create a for loop to store my Data in a 3D array [100,200,200]. Then I used my data array to calculate another matrix B as shown below:
>
> for i=0, 99 do begin
> ArrayData = C:\Users\..
> endfor

I assume the right hand side of "ArrayData = C:\Users\.." is really some operation where you read values from a file. But more important for your question, the left hand side has no subscripts so your loop would create a new array for each i, instantly forgetting the previous array. Is this really what you do?

>
> B = total(ArrayData[0:4,*,*],1)/5.
>
> A question that I have is once I used the ArrayData outside the for loop does it contains all the elements of the array or just those on the place [100,120,120]?

Why don't you inspect the array and see for yourself where there is data?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL inverse matrix problem
Next Topic: Wavelet transform in IDL?

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

Current Time: Wed Oct 08 19:23:58 PDT 2025

Total time taken to generate the page: 0.00436 seconds