How to avoid or delete Nan values in addtion?
1 回表示 (過去 30 日間)
古いコメントを表示
Shubham Mohan Tatpalliwar
2018 年 10 月 10 日
if i have2 matrix
A=[2 NaN ; 3 NaN]
B=[NaN 4 ; NaN 5]
I want C as
[2 4 ; 3 5 ]
edited by guillaume: Nan is not valid in matlab. NaN or nan is.
0 件のコメント
採用された回答
madhan ravi
2018 年 10 月 10 日
編集済み: madhan ravi
2018 年 10 月 10 日
A=[2 NaN ; 3 NaN] %Edited
B=[NaN 4 ; NaN 5]
A(isnan(A))=0
B(isnan(B))=0
C=[A;B]'
3 件のコメント
その他の回答 (1 件)
参考
カテゴリ
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!