replace 1 in place of NaN
Show older comments
I have matrix with some elements NaN. I want to replace them with 1. how to do it
Answers (1)
KSSV
on 11 Nov 2016
Let K be your array which has nan.
K(isnan(K))=1;
Categories
Find more on NaNs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!