Re: REFORM: new subscripts must not change the number elements in array [message #90432 is a reply to message #90431] |
Mon, 02 March 2015 11:34   |
Phillip Bitzer
Messages: 223 Registered: June 2006
|
Senior Member |
|
|
On Monday, March 2, 2015 at 11:31:56 AM UTC-6, g.na...@gmail.com wrote:
> I read the documentation, and I noticed that The REFORM function changes the dimensions of an array without changing the total number of elements. That's what I want but I didn't understand how the others end up with a = reform(a, 100l, 200l*2l, /overwrite).
>
Then you really need to read it again.
Your original question asks why an array that is 200x200 can not be reformed into an array that 100x40000.
On Monday, March 2, 2015 at 1:25:24 PM UTC-6, g.na...@gmail.com wrote:
> I used the example provided by mo who said that 200*200=100*400. When a 2D array has dimensions [216,216] then 216*216=120*388.8
>
> when I tried a=reform(a,120l,388.8L,/overwrite) I got the old error
Uh, a dimension with 388.8 elements?
As someone was said around here before he "retired," no, no, you're doing it all wrong.
|
|
|