Re: How to change a value into NaN
- From: Scott <no@xxxxxxxx>
- Date: Fri, 29 Jun 2007 13:58:25 -0400
J.Meyer wrote:
wrote:
On Jun 29, 1:21 pm, Peter Boettcher <boettc...@xxxxxxxxxx>
"J.Meyer" <j.meye...@xxxxxxxxx> writes:
Possibly a very basic question, but:
Is there a way to change a value into NaN? If so, how?
As always, thank you in advance for any ideas.
I'm not sure which of the following you mean:
val = NaN;
val(3,7) = NaN;
data(data>42) = NaN;
-Peter
I have a matrix of values and I would like to replace the values
that
are "0" with "NaN". I have tried the "strrep" approach and the
result
is a one-row matrix rather than the 88x118 matrix.
If A is your numeric matrix, try A(A==0)=NaN.
Scott
.
- Follow-Ups:
- Re: How to change a value into NaN
- From: J.Meyer
- Re: How to change a value into NaN
- References:
- How to change a value into NaN
- From: J.Meyer
- Re: How to change a value into NaN
- From: Peter Boettcher
- Re: How to change a value into NaN
- From: J.Meyer
- How to change a value into NaN
- Prev by Date: Re: Matlab 7.4 OSX
- Next by Date: Re: Legends for filled contour plots
- Previous by thread: Re: How to change a value into NaN
- Next by thread: Re: How to change a value into NaN
- Index(es):