Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Matrix manipulation question
Posted:
Jun 27, 1996 7:08 PM


Hi. I was wondering if any of you vectorizedcode gurus out there had a quick answer for me.
I have a matrix A with elements that I wish to keep unchanged if they are greater than zero, otherwise I would like to make them zero.
Can this be done without writing a loop?
ObMatlab: As a new user who reads this newsgroup regularly, I find myself spending time trying to think of clever ways to do things like this, rather than making real progress on my problem by using brute force and simple stuff I already know from other programming languages. I've seen some recent discussion regarding the speed of one line commands, as well, suggesting they aren't always advantageous. Since i've only spent a few sessions with Matlab, I don't really know if devoting time to learning elegant Matlab coding practices is useful. Any comments on this?
Thanks Steve Biellak biellak@joey.stanford.edu



