我一直在試圖在matlab中顯示an和bn fourier係數,但沒有成功,我能夠顯示a0,因爲這不是迭代的一部分。使用matlab數值積分的傅立葉係數
,我將非常感謝您的幫助,下面是我的代碼
syms an;
syms n;
syms t;
y = sym(0);
L = 0.0005;
inc = 0.00001; % equally sample space of 100 points
an = int(3*t^2*cos(n*pi*t/L),t,-L,L)*(1/L);
bn = int(3*t^2*sin(n*pi*t/L),t,-L,L)*(1/L);
a0 = int(3*t^2,t,-L,L)*(1/L);
a0 = .5 *a0;
a0=a0
for i=1:5
y = subs(an, n, i)*cos(i*pi*t/0.0005)
z = subs(bn, n, i)*sin(i*pi*t/0.0005)
end
matlab檢索到的錯誤是什麼? – fpe 2013-02-16 10:58:29
,您能否向我們提供預期結果清單? – fpe 2013-02-16 11:05:03