replace 1 in place of NaN

3 次查看(过去 30 天)
Jay Hanuman
Jay Hanuman 2016-11-11
回答: KSSV 2016-11-11
I have matrix with some elements NaN. I want to replace them with 1. how to do it

回答(1 个)

KSSV
KSSV 2016-11-11
Let K be your array which has nan.
K(isnan(K))=1;

类别

Help CenterFile Exchange 中查找有关 NaNs 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by