フィルターのクリア

How to solve this simple index problem

1 回表示 (過去 30 日間)
Rita
Rita 2015 年 8 月 30 日
コメント済み: Rita 2015 年 8 月 30 日
Hi, I have
a=[1;2;3]and b=[23;nan;4]
how I can get these
c=[2] and also D=[1,23;3,4]
Thanks a lot

採用された回答

Walter Roberson
Walter Roberson 2015 年 8 月 30 日
idx = isnan(b);
c = a(idx);
D = [a(~idx), b(~idx)];
  1 件のコメント
Rita
Rita 2015 年 8 月 30 日
Thanks a lot Walter

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by