The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM 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 ]
Teja Muppirala

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

I believe that instead of taking absolute values of complex numbers and squaring, it is faster to multiply by the conjugate.

Instead of this:

M = something;
Z = sum(abs(M).^2),2)

Do this:

M = something;
Z = sum(M.*conj(M),2)

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.