필터 지우기
필터 지우기

How do I plot a fourier transform?

조회 수: 3 (최근 30일)
ha9981
ha9981 2012년 12월 4일
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
ha9981
ha9981 2012년 12월 4일
The output is a series of dirac delta. HOW THE HECK TO PLOT IN MATLAB?

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

답변 (1개)

Walter Roberson
Walter Roberson 2012년 12월 4일
mag_func = matlabFunction(mag, w);
wrange = linspace(-100, 100, 1000); %adjust as desired
plot(wrange, mag_func(wrange))

카테고리

Help CenterFile Exchange에서 Frequency Transformations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by