【发布时间】:2013-01-31 19:27:11
【问题描述】:
我一直试图在 matlab 中显示 an 和 bn 傅立叶系数,但没有成功,我能够显示 a0,因为这不是迭代的一部分。
非常感谢您的帮助,以下是我的代码
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 检索到的错误是什么?
-
您能给我们提供一份预期结果的清单吗?
标签: fft matlab numerical-integration