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: Numerical difference between fft and exp
Replies: 1   Last Post: Jan 31, 2013 2:52 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Peter Mairhofer

Posts: 29
Registered: 8/18/10
Numerical difference between fft and exp
Posted: Jan 31, 2013 12:15 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

Also, why do I get a difference around 1e-3 (small but much too large)
between H_orig and H_orig2?

b = [1 0.75 0.5];
N=1000;
H_orig = fft([b.' ; zeros(N-length(b), 1)]);
w = linspace(0, 2*pi, N);
H_orig2 = b(1) * exp(-1i*w*0) + b(2) * exp(-1i*w*1) + b(3) * exp(-1i*w*2);

I would exprect a result up to numerical precision.

Thanks,
Peter




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.