deleting n entries in matlab

1 回表示 (過去 30 日間)
ali hassan
ali hassan 2022 年 2 月 12 日
編集済み: Matt J 2022 年 2 月 12 日
if a=[1 nan 4 nan 4 3 ]
how can i delete all nan entries here such that it becomes:
a=[1 4 4 3]

採用された回答

Matt J
Matt J 2022 年 2 月 12 日
編集済み: Matt J 2022 年 2 月 12 日
a=[1 nan 4 nan 4 3 ];
a=a(~isnan(a))
a = 1×4
1 4 4 3

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by