how to reshape a matrix?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a matrix that it is 321*531. It includes NaN values, which i have to eliminate them. Thus, I used this code:
m=~isnan(x);
v=x(m)';
then it turned to 1*75638. I wanna reshape it to 321*531,but I don't know how can I do this.I have tried reshape function,but it doesn't work.
please help me. thanks
回答 (1 件)
adi kul
2016 年 12 月 27 日
If you are okay with replacing NaN values with Zeros then:
A(isnan(A))=0
Here A will be your matrix.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!