
Re: how can I avoid for cycle in this snippet
Posted:
Nov 29, 2009 6:03 AM


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

