Borrar filtros
Borrar filtros

Plotting dirac delta function's spectrum

9 visualizaciones (últimos 30 días)
geometry geometry
geometry geometry el 3 de Nov. de 2017
Editada: Marcos Duraes el 30 de Abr. de 2019
I used the following code to plot the spectrum of some functions. but it doesn't work for the function dirac(t-t0) at t0=0. How can I fix it?
syms t w;
syms g h U;
g(w)=fourier(dirac(t));
h=abs(g);
w=-10:.5:10.1;
U=angle(g);
figure;
plot(w, subs(h));
figure;
plot(w,subs(U));
  1 comentario
Marcos Duraes
Marcos Duraes el 30 de Abr. de 2019
Editada: Marcos Duraes el 30 de Abr. de 2019
%Para plotar a o gráfico de uma variable type syms utilize a função fplot(); Logo.
syms t w;
syms g h U;
g(w)=fourier(dirac(t));
h=abs(g);
U=angle(g);
figure;
fplot(g);

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 3 de Nov. de 2017
The Fourier (and Laplace) transforms of the Dirac delta function are uniformly 1 for all omega (or ‘s’).
That is the result you get in ‘g(w)’.
  2 comentarios
geometry geometry
geometry geometry el 3 de Nov. de 2017
Yes the Fourier transform of Dirac delta function equals one for all omega but the problem is that nothing is plotted when I run it.
Star Strider
Star Strider el 3 de Nov. de 2017
It does if you use fplot rather than plot:
syms t w g h U;
g(w)=fourier(dirac(t));
h=abs(g);
w=-10:.5:10.1;
U=angle(g);
figure;
fplot(g)
figure;
fplot(U)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Formula Manipulation and Simplification en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by