How to remove column with 0 in matrix?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a 0x100x150 double, but how do I get rid of the zero, so it becomes 100x150?
채택된 답변
rakshit gupta
2023년 6월 6일
You can use the squeeze() function in MATLAB to remove dimensions with size 1 in a multidimensional array.
The following code will give you, which is a 100x150 array but with same data as A.
% assuming your 0x100x150 double is named A
B = squeeze(A); % remove dimensions with size 1
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!