필터 지우기
필터 지우기

Plotting dirac delta function's spectrum

조회 수: 9 (최근 30일)
geometry geometry
geometry geometry 2017년 11월 3일
편집: Marcos Duraes 2019년 4월 30일
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
Marcos Duraes
Marcos Duraes 2019년 4월 30일
편집: Marcos Duraes 2019년 4월 30일
%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);

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2017년 11월 3일
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
geometry geometry
geometry geometry 2017년 11월 3일
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 2017년 11월 3일
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)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Formula Manipulation and Simplification에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by