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: How to replace values<300 in a matrice
Replies: 1   Last Post: Apr 9, 2012 6:54 PM

Advanced Search

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

Posts: 6
Registered: 4/3/12
How to replace values<300 in a matrice
Posted: Apr 9, 2012 6:35 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a matrix 2D (M) and i want to replace each value <300 with the number 3.

I'm trying with the function FIND:

[a b]=find[M<300];

a and b are 2 vectors
in this way i have in a and b the indices of the positions of values<300.
But how can i replace this values??
I was thinking about a FOR CYCLE... but it's difficult for me...
thanks everybody for your help

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.