- #1
taylrl3
- 61
- 0
Hey!
I am using IDL and want to store the values found using a loop. The only problem is each time the loop goes round, it re-writes all the values in the array. How do I store the values for use once the loop has finished? Seems like a really simple thing to want to do, I am surprised I can't do it or havn't had to do it before. Anyways here is what I have got so far, I've had a go but it doesn't work:
for num=0, 32 do begin
DMID=(Basically I read the values into this array from 32 separate files)
result=where(DMID, count)
imin=-1
imax=0
for imin, imax do begin
imax=imax+count
DMIDs[imin:imax]=DMID
imin=imin+count
endfor
endfor
This doesn't work anyway and seems like a slightly mental way of going about it to me but its what a friend told me to do. Any help, most appreciated.
I am using IDL and want to store the values found using a loop. The only problem is each time the loop goes round, it re-writes all the values in the array. How do I store the values for use once the loop has finished? Seems like a really simple thing to want to do, I am surprised I can't do it or havn't had to do it before. Anyways here is what I have got so far, I've had a go but it doesn't work:
for num=0, 32 do begin
DMID=(Basically I read the values into this array from 32 separate files)
result=where(DMID, count)
imin=-1
imax=0
for imin, imax do begin
imax=imax+count
DMIDs[imin:imax]=DMID
imin=imin+count
endfor
endfor
This doesn't work anyway and seems like a slightly mental way of going about it to me but its what a friend told me to do. Any help, most appreciated.