|
|
Re: Efficiently computing large numbers of vector norms
Posted:
Nov 12, 2012 2:48 PM
|
|
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).
|
|