How can you display a null/empty matrix?
조회 수: 3 (최근 30일)
이전 댓글 표시
is this a way? M = [ ] disp(M)
댓글 수: 1
답변 (1개)
Benjamin Avants
2014년 3월 14일
Your method won't display anything. You can remove the semicolon from the line that assigns a value to M and it will display like this:
M = []
M =
[]
If you want to test if it is empty use something like the following:
M = [];
if isempty(M)
disp('M is empty')
end
댓글 수: 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!