フィルターのクリア

fourier series for function and period

1 回表示 (過去 30 日間)
harley
harley 2014 年 5 月 4 日
編集済み: Star Strider 2014 年 5 月 4 日
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.

採用された回答

Star Strider
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 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by