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!