Why dosen't this Fourier Transform compute?

6 views (last 30 days)
Hey! I'm trying to take a fourier transform of a particular function and Matlab doesn't seem to be able to compute it, I tried the same function in Mathmatica and it works just fine so I'm not sure whats gone wrong in this case. I used the following code:
% Program to compute the Impulse response of a third order Butterworth % filter.
syms w t
oc = 100e3*2*pi; %Cut off frequency
n = 3 %Order Number
%Transfer Function
H = oc^n /(((1i*w)+oc)*(((1i*w)^2)+(oc^2)+(2*(1i*w)*oc*sin(pi/(2*n)))));
x = fourier(H, w, t)
Impulse3 = matlabFunction(x)

Answers (1)

Image Analyst
Image Analyst on 24 Jun 2015
I don't have the fourier() function. Does it show up in your help? Maybe it's in a toolbox that you have but that I don't have. Maybe that's what they call it in Mathematica but you didn't change the name when you came to MATLAB???
What I would do (because I don't have that fourier() function) is to use the fft() function . Can you try that?
Don't double space your code, just paste, highlight, and click {}Code. I fixed your formatting but please read this for next time. http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Also, you forgot to paste in all the red error text so I'm guessing you've never read these guidelines: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer. Please paste in whatever you have that tells you that "Matlab doesn't seem to be able to compute it", such as an error message.
  2 Comments
Mariam Akhtar
Mariam Akhtar on 24 Jun 2015
Sorry! I didn't realise it wasn't a standard function, fourier() is in the symbolic maths toolbox. It doesn't come up with an error it just returns the code below. It doesn't actually perform the fourier transform.
248050213442398464*fourier(1/(w^3*(-i) - (5397215081808807*w^2)/4294967296 + w*((58259861278608895979470988302065*i)/73786976294838206464) + 34909964025886182950067141590247/140737488355328), w, t)
Image Analyst
Image Analyst on 24 Jun 2015
Hopefully someone with that toolbox will answer. Or else, call the Mathworks technical support.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!