Fourier transform in continuous time

68 views (last 30 days)
Kelly Howard
Kelly Howard on 27 Jan 2016
hi guys, i trying out an example from the textbook 'DSP using matlab'.
for t=0:100
answer= fft(x)
is there any mistake in my code as i could not get the right answer using matlab

Answers (2)

Star Strider
Star Strider on 27 Jan 2016
For continuous time signals, you have to use the Symbolic Math Toolbox:
syms a t w
FT = int(exp(a*t) * exp(j*w*t), t, 0, Inf)
FT =
limit(exp(t*a)*exp(t*w*1i), t, Inf)/(a + w*1i) - 1/(a + w*1i)
If ‘a’ is negative, this is much more tractable.
Kelly Howard
Kelly Howard on 1 Feb 2016
let say i use a=log(0.3), i can't get any value out of it

Sign in to comment.

Santiago Vélez Jr. Casallas
Edited: Santiago Vélez Jr. Casallas on 14 Jan 2022
The most direct way is using fourier(f), where "f" is your continuous signal written in symbolic type (sym). You mut first declare the symbols for the time and frequency with "syms", and then apply:
An additional tip:
--> for me this function doesn't work with euler exponential functions, unless you declare them properly. For example, with Laplace functions:
As you can see it doesn't give error,but the result is the very expresion I wrote.
This is because the euler function has especial treatments in fourier tranforms or the integral will not converge. In this example, the constant that acompanies variable "t" (in this case 5), and "t" itself, must be positive, you can find it in Laplace's theory. So you must specify this, or the integral that matlab does will just not converge:
I did it with abs(), but it can b done with assume() funtion as well,for example:
You can know further about fourier(t) function in here:

Community Treasure Hunt

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

Start Hunting!