MATLAB Answers

Replace -99 with NaN

1 view (last 30 days)
Megan Mirkhanian
Megan Mirkhanian on 20 Jan 2020
Answered: Steven Lord on 21 Jan 2020
How do I repalce -99 values with NaN?

  0 Comments

Sign in to comment.

Answers (2)

Stijn Haenen
Stijn Haenen on 20 Jan 2020
x=[1 2 -99 3 4 -99 5 6 -99];
x(x==-99)=NaN;

  0 Comments

Sign in to comment.


Steven Lord
Steven Lord on 21 Jan 2020
Consider using the standardizeMissing function. The first example on that documentation page does exactly what you described.

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags