manibulation of 3d matrix

2 Ansichten (letzte 30 Tage)
Rica
Rica am 22 Mai 2013
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!

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 22 Mai 2013
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)

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by