这是我主程序的一部分,x(:,1)是ode45求出来的一组数,t_T和t_0也都赋值了,运行过程中fzero调用dF出错,但我不知道怎么改正,请求高手指点,谢谢!!
x_1=poly2sym(x(:,1),'t');
TL=(t_T-t_0);
dF=0;
F=0;
for ni=1:5
    syms t
    ani=2.*int(x_1.*cos(2.*ni.*pi.*t./TL),t,-TL./2,TL./2)./TL;
    bni=2.*int(x_1.*sin(2.*ni.*pi.*t./TL),t,-TL./2,TL./2)./TL;
    dF=dF+(ani.*2.*ni.*pi./TL).*sin(2.*ni.*pi.*t./TL)+(bni.*2.*ni.*pi./TL).*cos(2.*ni.*pi.*t./TL);
    F=F+ani.*cos(2.*ni.*pi.*t./TL)+bni.*sin(2.*ni.*pi.*t./TL);
end
t=fzero(dF,tspan);
给出的错误是这样的:
??? Error using ==> error
When the first input is a message identifier, the second input
must be a string.
Error in ==> fzero at 157
    error('MATLAB:fzero:InvalidFUN',msg)
Error in ==> shoot2 at 36
t=fzero(df,tspan);