How to Calculate the CTFT of a Function Using MATLAB's FFT?

  • Context: MATLAB 
  • Thread starter Thread starter olen501
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary

Discussion Overview

The discussion revolves around calculating the Continuous-Time Fourier Transform (CTFT) of a function using MATLAB's FFT function. Participants explore various methods and tools available within MATLAB and other software for this purpose, including symbolic math capabilities.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about using MATLAB's fft function to compute the CTFT, expressing uncertainty about its application.
  • Another participant suggests using the fft function along with fftshift and emphasizes the importance of plotting over the correct frequency range to obtain accurate results.
  • A different participant clarifies that the CTFT refers to the Continuous-Time Fourier Transform and notes that direct computation of a continuous function is not feasible on a computer. They recommend using MATLAB's symbolic math toolbox for this purpose, although they caution that the output may be complex and difficult to simplify.
  • One participant recommends using Mathematica for symbolic computations, implying it may be better suited for such tasks than MATLAB.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to compute the CTFT, with some advocating for MATLAB's capabilities while others suggest alternative software like Mathematica. The discussion does not reach a consensus on the most effective method.

Contextual Notes

Participants note limitations in using numerical methods for continuous functions and the potential complexity of outputs from symbolic math tools. There is also mention of the challenges in simplifying results from these computations.

Who May Find This Useful

This discussion may be useful for individuals interested in signal processing, particularly those looking to compute Fourier transforms using MATLAB or other computational tools.

olen501
Messages
6
Reaction score
0
Does anyone know how to find the CTFT of a function using MatLab? I know MatLab has a built in function called fft that finds the fast Fourier transform, but I don't know how to use the fft to find the CTFT. Can anyone help me out?
 
Physics news on Phys.org
You can do something like:

x = cos(2*pi*f*t);
ft = fftshift(fft(x));

Then you must plot over the proper frequency range. This is most likely why you can't work with fft and get the right results.
 
When you say CTFT, you mean the Continous-Time Fourier Transform? The only way to do that on a computer is using symbolic math. You can't directly represent a continuous function inside the computer, and so you can't directly compute its Fourier Transform. So, supposing you have an expression for the function in question, you can feed that into the symbolic math toolbox, and have it give you an expression for the answer. I haven't used Matlab's symbolic math capabilities very much, so I can't comment further, but you might also just use The Integrator ( http://integrals.wolfram.com/index.jsp ). The downside to these approaches is that they tend not to be terribly good at simplifying the results, so you're apt to get a huge string of special functions that all end up cancelling each other out. Often, the process of simplifying the output of these symbolic math systems can be as laborious as simply doing the integral yourself in the first place. They are good resources if you're stuck or want to check your answers, though...
 
Yes, better to use a package designed with symbolic computations in mind...like Mathematica.
 
Thanks
 
thanks
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K