How to convert a column back into matrix?
조회 수: 2 (최근 30일)
이전 댓글 표시
채택된 답변
Guillaume
2016년 3월 23일
If you don't know what the original size of the matrix was, then you of course can't since matlab does not keep the information.
A = randi([1 20], 10, 20, 30);
B = A(:);
AA = reshape(B, 10, 20, 30);
isequal(A, AA) %will return true
Note that A(:) is equivalent to
reshape(A, [], 1)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!