2D matrix to 3D
이전 댓글 표시
Can anyone help me with making a 2D matrix into a 3D matrix?I have aI have a (616*780) 2d matrix and I need to make a 3D matrix of dimensions (616*780 x M) I need to take (616*780) consecutive matrices by row for layers,where M is the max value in the 2d matrix. Means I want to slice the 2D matrix.
I would appreciate it if anyone could help me! Thank you very much!
채택된 답변
추가 답변 (1개)
madhan ravi
2019년 6월 5일
repmat(a,1,1,max(a(:))) % where a is your matrix if you have decimals in your matrix then use round function for max() to make the max value as an integer
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!