fourier series for function and period
조회 수: 3 (최근 30일)
이전 댓글 표시
hi, trying to calculate the fourier series expansion in the period -3<t<3
f(t)={2, -3<t<0; {0, 0<t<3.
any help would be appreciated.
댓글 수: 0
채택된 답변
Star Strider
2014년 5월 4일
편집: Star Strider
2014년 5월 4일
You can actually do this by hand quite easily. Using the Symbolic Math Toolbox to do the same thing:
syms t w
f1 = 2;
f1_lims = [-3 0];
f2 = 0;
f2_lims = [0 3];
% Integrate to get the Fourier series for ‘f1’:
F1 = int(exp(-j*w*t) * f1, t, f1_lims(1), f1_lims(2))
% Do the same for ‘f2’:
F2 = int(exp(-j*w*t) * f2, t, f2_lims(1), f2_lims(2))
% Add them
FT = F1 + F2;
% Plot the result:
figure(1)
subplot(2,1,1)
ezplot(abs(FT), [-10*pi, 10*pi])
subplot(2,1,2)
ezplot(angle(FT), [-10*pi, 10*pi])
Experiment with this on your own to see how the transform changes if the function is symmetrical about t=0 instead ( i.e. f2=2 instead of 0 ) . How would you code a symmetric or asymmetric triangle pulse? Have some fun with it!
Note that the value of the Fourier transform at w=0 is not NaN. Think L’Hôpital’s rule...
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!