Save multiple 2d-Arrays with different amount rows in the same 3d-Array
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Marine and Underwater Vehicles에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!