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 CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by