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 can I avoid for cycle in this snippet
Replies: 4   Last Post: Nov 29, 2009 1:07 PM

Advanced Search

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

Posts: 23
Registered: 9/15/09
Re: how can I avoid for cycle in this snippet
Posted: Nov 29, 2009 6:03 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

no, it doesn't work

"asd def" <lovlovlov@indiatimes.com> wrote in message <hest13$2ht$1@fred.mathworks.com>...
> U(:,1:size(U,2)) = U(:,1:size(U,2)) ./ norm(U(:,1:size(U,2)),2);
> ?? works
> "Patrick Diviacco" <patrick.diviacco@gmail.com> wrote in message <hesrme$bbl$1@fred.mathworks.com>...

> > hi,
> >
> > can I better write the following lines avoid to use a for cycle ?
> >
> > for i = 1:size(U,2)
> > U(:,i) = U(:,i) / norm(U(:,i),2);
> > end
> >
> > thanks

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.