我一直在试图在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