save multiple matrix from 2D to one 3D in sequence

조회 수: 2 (최근 30일)
mohammed hussein
mohammed hussein 2017년 12월 24일
댓글: mohammed hussein 2017년 12월 24일
Hi i have multiple matrix in 2D i want to save those in one 3D in sequence . for example i have matrix A , B ,C ,D ,and E i want the first slice is A and second slice is B and third slice is C and so on . lets say i have this matrices
A=ones(4);
B=2*ones(4);
C=3*ones(4);
D=4*ones(4);
E=5*ones(4);
3Dmatrix=?
thank you
  댓글 수: 2
Matt J
Matt J 2017년 12월 24일
I see you have been active in the forum for several years now. You will make life easier for yourself and others if you learn how to use the {}Code button,
mohammed hussein
mohammed hussein 2017년 12월 24일
thank you for letting me know , it is the first time for me to know there is the {}Code button. i will use it in future.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2017년 12월 24일
편집: Matt J 2017년 12월 24일
result = cat(3, A,B,C,D,E)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by