matrix turning nans to 1

1 回表示 (過去 30 日間)
Mate 2u
Mate 2u 2012 年 7 月 18 日
Hi all, I have a 294x1 matrix, and I want to convert all the NaNs to 1.
If anybody could assist me I would be grateful.
Thanky ou.

採用された回答

Matt Kindig
Matt Kindig 2012 年 7 月 18 日
Let M be your matrix.
M(isnan(M))=1;

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by