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: 38
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


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];
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.


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

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.