标签: octave
x(t,k)返回复数,然后尝试对这些数字进行积分并想绘制这些值,然后发现此错误
k=-50:50; function y=x(t,k) y = (1-2*abs(t)) .* exp(t*2*pi/6*k*-i); end function y=a(k) y = integral(@(t) x(t,k),-.5,.5); end figure(1); stem(k,a(k)); title('a(k)'); axis([-50 50 -3 3]);