Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Efficiently computing large numbers of vector norms
Replies: 16   Last Post: Nov 15, 2012 8:32 AM

 Messages: [ Previous | Next ]
 Matt J Posts: 4,997 Registered: 11/28/09
Re: Efficiently computing large numbers of vector norms
Posted: Nov 9, 2012 9:49 AM

"Matt J" wrote in message <k7hksg\$etp\$1@newscl01ah.mathworks.com>...
>
>
> 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);

Date Subject Author
11/7/12 Harry Commin
11/7/12 Harry Commin
11/8/12 Teja Muppirala
11/8/12 Teja Muppirala
11/8/12 Bruno Luong
11/8/12 Matt J
11/9/12 Matt J
11/12/12 Harry Commin
11/12/12 Harry Commin
11/13/12 Matt J
11/13/12 Harry Commin
11/13/12 Matt J
11/13/12 Harry Commin
11/13/12 Matt J
11/14/12 Harry Commin
11/15/12 Harry Commin
11/15/12 Matt J