manibulation of 3d matrix

2 vues (au cours des 30 derniers jours)
Rica
Rica le 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!

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 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)

Plus de réponses (0)

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by