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 apply bsxfun to all the rows of a matrix?
Replies: 2   Last Post: Dec 27, 2011 7:00 PM

Advanced Search

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

Posts: 17
Registered: 2/28/07
Re: how apply bsxfun to all the rows of a matrix?
Posted: Dec 27, 2011 7:00 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Dec 27, 3:30 pm, "Matt J " <mattjacREM...@THISieee.spam> wrote:
> Aseman <andali...@gmail.com> wrote in message <430040b9-e612-4476-aa3c-d96339899...@u6g2000vbg.googlegroups.com>...

> > How could I repeat the above for all the rows of test, without any
> > loop in the code?

> rowDiff=bsxfun(@minus, test, reshape(test.',[1,size(test.')]))

Thanks Matt!
I should have learned from the solution you provided to my previous

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

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