Replace NAN in matrix with empty cells and reshape to matrix
4 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix X with several NAN values. I want replace the NAN with just blank cells, not zeros. Then I want to end up with a matrix. The problem is that it reshapes the matrix when I use this code
X(isnan(X))=[];
How can I replace the NAN with blanks and end up with the same matrix?
8 件のコメント
Guillaume
2018 年 6 月 28 日
Then use functions that ignore nans by e.g. using the 'omitnan' of mean (or sum, or ...) in your analysis. Without more details of your analysis it's difficult for us to give you advice.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で NaNs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!