Save multiple 2d-Arrays with different amount rows in the same 3d-Array
Show older comments
I wat to save differet 2d-Array in one 3d-Array
A =
1 1 1
1 1 1
1 1 1
B =
2 2 2
2 2 2
2 2 2
2 2 2
Array3d(:,:,1) = A(:,:)
Array3d(:,:,2) = A(:,:)
the resault is this message:
Unable to perform assignment because the size of the left side is 3319-by-7 and the size of the right
side is 1574-by-7.
I agree that they are not the same size, but i'm searching for a way how to size up the first (and several previous) "2d-Layers" of the 3d-Array.
For example i want that the Array-"Layer" Array3d(:,:,1) gets tranformed to this
Array3d(:,:,1) =
1 1 1
1 1 1
1 1 1
0 0 0
I expected a way of self extension like in this case
>> C(3,2)= 1
C =
0 0
0 0
0 1
I don't have to define the zeros...
Would be very thankfull for any help.
Accepted Answer
More Answers (0)
Categories
Find more on Marine and Underwater Vehicles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!