help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: norm and a question


From: Evan Monroig
Subject: Re: norm and a question
Date: Sat, 12 Nov 2005 21:47:51 +0900

On 11/12/05, Gorazd Brumen <address@hidden> wrote:
> Hi!
>
> First question: Is it possible to do a 2-norm of each column vector in a
> matrix without a for loop?

Hi,

For the first question, I guess that the following would work for a
real matrix (sorry I cannot test it right now), but I don't know if
there is something nicer to do that....

colnorm = sum(A .* A);

Evan



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]