Borrar filtros
Borrar filtros

How do I plot a fourier transform?

3 visualizaciones (últimos 30 días)
ha9981
ha9981 el 4 de Dic. de 2012
syms t w
x1 = sin(2*pi*20*t)*cos(2*pi*2000*t);
x2 = sin(2*pi*40*t)*cos(2*pi*4000*t);
x = x1+x2;
X= fourier(x,t,w)
mag = abs(X)
I can't seem to figure out how to plot this.
  1 comentario
ha9981
ha9981 el 4 de Dic. de 2012
The output is a series of dirac delta. HOW THE HECK TO PLOT IN MATLAB?

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Dic. de 2012
mag_func = matlabFunction(mag, w);
wrange = linspace(-100, 100, 1000); %adjust as desired
plot(wrange, mag_func(wrange))

Categorías

Más información sobre Frequency Transformations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by