Insert blank cells in a matrix
42 ビュー (過去 30 日間)
古いコメントを表示
How can I replace all the NaN values of a matrix with a blank space?
0 件のコメント
採用された回答
Walter Roberson
2021 年 11 月 30 日
You cannot do that. Numeric matrices cannot have spaces in them.
You can convert the matrix into a cell array and put spaces into the cell array... but it is not clear why you would do that.
myCell = num2cell(MyMatrix);
myCell(isnan(MyMatrix)) = {' '}; %nan -> space
Now what?
12 件のコメント
その他の回答 (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!