matrix turning nans to 1

1 vue (au cours des 30 derniers jours)
Mate 2u
Mate 2u le 18 Juil 2012
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.

Réponse acceptée

Matt Kindig
Matt Kindig le 18 Juil 2012
Let M be your matrix.
M(isnan(M))=1;

Plus de réponses (0)

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by