manibulation of 3d matrix

조회 수: 2 (최근 30일)
Rica
Rica 2013년 5월 22일
hi all! I have a matraix:
A(1,:,:)=[a1 a2 a3..;a11 a22 a33 ..;.....;]
B(1,:,:)=[b1 b2 b3..;b11 b22 b33 ..;.....;]
how could make the matrix C
C=[a1 a2 a3..;b1 b2 b3..;a11 a22 a33 ..;b11 b22 b33 ..;.....;]
thank you!

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 5월 22일
A(:,:,1)=[1 2 3;4 5 6;7 8 9]
B(:,:,1)=[10 20 30 ;40 50 60;70 80 90]
[n,m]=size(A(:,:,1))
C=zeros(2*n,m)
C(1:2:end)=A(:,:,1)
C(2:2:end)=B(:,:,1)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by