フィルターのクリア

How to delete nan from array

543 ビュー (過去 30 日間)
Hana
Hana 2015 年 1 月 13 日
コメント済み: Yang Liu 2022 年 8 月 4 日
B=[nan 8 nan;6 nan nan;6 5 8] C=[nan 4 nan;4 nan nan;5 3 2]
Answer: B=[8 6 6 5 8] C=[4 4 5 3 2]

採用された回答

Guillaume
Guillaume 2015 年 1 月 13 日
編集済み: Guillaume 2015 年 1 月 13 日
B = B';
B = B(~isnan(B))';
C = C';
C = C(~isnan(C))';
  3 件のコメント
Guillaume
Guillaume 2015 年 1 月 13 日
Yes, not sure what I was thinking.
Yang Liu
Yang Liu 2022 年 8 月 4 日
Why use '? Why not just B=B(~isnan(B))?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by