Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
jonathan

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.
Example:
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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.