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: 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 ]
giusep

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]

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