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

Home » Public Forums » archive » REFORM: new subscripts must not change the number elements in array
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: REFORM: new subscripts must not change the number elements in array [message #90423 is a reply to message #90416] Mon, 02 March 2015 08:24 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Monday, March 2, 2015 at 4:43:17 PM UTC+1, g.na...@gmail.com wrote:
> There is one thing I don't understand. Both of you suggest the same thing:
> a = reform(a, 100l, 200l*2l, /overwrite)
> You typed 200l*2l this is because we want 200x200 that's why you multiplied it by 2?
> What I want it's 100 x (200x200). So 100 2D images of dimensions [200,200]

Ok, so before, I didn't see this message.
You're sort of changing things around here.
You started from ONE array with 200x200 elements and wanted to make something of 100x(40000) elements. This of course will never work.
What you really want is to make a 100x200x200 array from 100 arrays of 200x200. Correct?

But where do you get the 100 arrays of 200x200?

Try this:

finalArray = fltarr(100,200,200)
for i=0, 99 do begin
;generate the array
a = randomu(s,200,200)
;put it in the final array
finalArray[i,0,0] = reform(a,1,200,200)
endfor

Regards,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: function graphics event handling
Next Topic: Image in color scale and gray level scale.

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

Current Time: Wed Oct 08 15:49:52 PDT 2025

Total time taken to generate the page: 0.00440 seconds