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