Replacing zeros with empty values?
33 ビュー (過去 30 日間)
古いコメントを表示
Is it possible for matrices in matlab to replace zeros by empty values i.e. not even give a zero but have blank entries?
0 件のコメント
採用された回答
Sean de Wolski
2012 年 6 月 21 日
No. Not unless every row/column has one and you concatenate.
It is possible to have empty elements in cell arrays though, consider:
A = magic(5); %sample
A(A<10)=0; %some zeros
C = cellfun(@(x)x(logical(x)),num2cell(A),'uni',false) %cell with empties where zeros were
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!