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 ]
Harry Commin

Posts: 11
Registered: 10/8/10
Re: Efficiently computing large numbers of vector norms
Posted: Nov 12, 2012 2:48 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks very much for these suggestions. Perhaps I am doing something wrong -- while I am getting the correct results numerically, I am not getting the speed boost I had hoped for.

> result = sum( abs( kron(A1',A2')*X2 ).^2 , 2) ;

For some simple test data, I find this to perform a little faster (including the necessary reshape operation). Approximately 0.032secs compared to 0.037secs.

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

In this case, my performance is much slower on the same test data (approx. 0.13secs).

My requirement is to execute this calculation many times on data similar in dimension to my test data (rather than once on enormous matrices). Perhaps this is the issue? (I'm running R2010b, but have a licence for R2012b which I can install if necessary).



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.