I am trying to save many float arrays in a multiple dimsensional array. Each float array belongs to a specific index in the dimensional array.
The array size of the float arrays are [128, 128].
What did I try?
(I made it simple, right now I am not using the [128, 128] size.)
multiple_array = MAKE_ARRAY(5, 3, /FLOAT)
> multiple_array
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
float_array = FLTARR(3, 3)
;skipped setting some simple values
> float_array
1.0000000 2.0000000 3.0000000
4.0000000 5.0000000 6.0000000
7.0000000 8.0000000 9.0000000
multiple_array[0, 0] = float_array
1.0000000 2.0000000 3.0000000 0.00000000 0.00000000
4.0000000 5.0000000 6.0000000 0.00000000 0.00000000
7.0000000 8.0000000 9.0000000 0.00000000 0.00000000
And that is actually not what I want! My float_array
should not overwrite the other indexes from my multiple array, but only the very first index (multiple_array[0, 0])
What do I want:
I was thinking something like this:
(Let's say this code would work like in other programming languages)
multiple_array[0, 0] = float_array
FIRST_FLOAT_ARRAY 0.0000000 0.0000000 0.00000000 0.00000000
0.0000000 0.0000000 0.0000000 0.00000000 0.00000000
0.0000000 0.0000000 0.0000000 0.00000000 0.00000000
And later my multiple_array
should look like this:
> multiple_array
FIRST_FLOAT_ARRAY SECOND_FLOAT_ARRAY THIRD_FLOAT_ARRAY FOURTH_FLOAT_ARRAY FIFTH_FLOAT_ARRAY
SIXTH_FLOAT_ARRAY 0.0000000 0.0000000 0.00000000 0.00000000
0.0000000 0.0000000 0.0000000 0.00000000 0.00000000
... and so on
What am doing with this later?
Later I want to get these values like this:
current_float_array = multiple_array[0, 0]
> help, current_float_array
CURRENT_FLOAT_ARRAY FLOAT = Array[3, 3]
> current_float_array
1.0000000 2.0000000 3.0000000
4.0000000 5.0000000 6.0000000
7.0000000 8.0000000 9.0000000
Is this even possible? For me it actually doesn't matter, if my multiple_array
would end in a PTRARR or anything else, as long as I have the result like current_float_array
I would be happy with it.
Thanks in advance for any help! I am looking forward for any suggestions.