I have matrix with some elements NaN. I want to replace them with 1. how to do it

Antworten (1)

KSSV
KSSV am 11 Nov. 2016

2 Stimmen

Let K be your array which has nan.
K(isnan(K))=1;

Gefragt:

am 11 Nov. 2016

Beantwortet:

am 11 Nov. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by