How can you display a null/empty matrix?
4 ビュー (過去 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!