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: Efficiently computing large numbers of vector norms
Replies: 16   Last Post: Nov 15, 2012 8:32 AM

Advanced Search

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

Posts: 4,992
Registered: 11/28/09
Re: Efficiently computing large numbers of vector norms
Posted: Nov 9, 2012 9:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Matt J" wrote in message <k7hksg$etp$1@newscl01ah.mathworks.com>...
>
> In your case, this would lead to
>
> result = sum( abs( KronProd(A2',A1')*X2 ).^2 , 2) ;


Make that

result = sum( abs( KronProd({A2',A1'})*X2 ).^2 , 2) ;



> then the whole thing gets even simpler/faster
>
> rownorms = @(M) sum(abs(M).^2);
>
> result=kron(rownorms(A2'*XX2) , rownorms(A1'*XX1));



And make that

rownorms = @(M) sum(abs(M).^2 , 2);



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.