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: Matrix manipulation question
Replies: 6   Last Post: Jul 9, 1996 9:31 AM

Advanced Search

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

Posts: 5
Registered: 12/7/04
Matrix manipulation question
Posted: Jun 27, 1996 7:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi. I was wondering if any of you vectorized-code 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







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.