manibulation of 3d matrix

2 visualizzazioni (ultimi 30 giorni)
Rica
Rica il 22 Mag 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!

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 22 Mag 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)

Più risposte (0)

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by