<VijaKhara@gmail.com> wrote in message
news:1123949048.826203.303600@g44g2000cwa.googlegroups.com...
> Dear all
>
>
> I need to plot Fourier transform of a continuos function x(t). How
> to
> do it in matlab? Is there a function available in matlab or we have
> to
> do it using the mathematical fomular?
>
You can use fourier() function to obtain the F(w), the fourier
transform of x(t).
However plotting it can be tricky as some functions, such as trig
functions, generate the dirac delta function as a result. For example
>> syms x; fourier(sin(x))
ans =
i*pi*(dirac(w1)+dirac(w+1))
To plot this F(w), one usually want to represent the dirac function as
a 'spike' where it is infinity (which ofcourse occures when its
arguments evaluates to zero). So, the above F(w) is 2 spikes, one at
w=1, and another negative spike at w=1, with a hight of Pi.
ie. the plot of F(w) is
^ Pi

 +w
+0+ frequency w
w 

V Pi
and so, ezplot() does not handle such functions. One possible way to
do this is to the subs() command to evaluate F(w) for number of w
values, and then replace everywhere where it has +Infi or Infi by 1
or 1 with the appropriate scaling thrown in. Then plot the generate
list of numbers using matlab plot command.
> By the way, do you know what function in matlab to integral a
> function
> x(t)? Thanks
>
>
help int
Nasser
