The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: find zeros and replace with NaN
Replies: 9   Last Post: Jan 11, 2013 3:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 39
Registered: 11/30/09
find zeros and replace with NaN
Posted: Apr 4, 2011 12:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have this matrix and I want to find all the zeros and change them to NaNs.
A=[1 0 4;3 2 0]
Should turn into
A=[1 NaN 4;3 2 NaN]

can you tell me how

Thank you for reply

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.