高手指教:
function y=sun(k0,t0,w10,w20,x)
k=k0;t=t0;w1=w10;w2=w20;
y=0;
for p=0:k
sum1=0;n=p;
while( n<=2*t)
if (n~=t)
s=(sin(w2*(n-t))-sin(w1*(n-t)))/pi*(n-t);
sum1=sum1+s*product(k+n-p)/(product(n-p)*product(k))*x.^(k+n-2*p);
else
s=(w2-w1)/pi;
sum1=sum1+s*product(k+n-p)/(product(n-p)*product(k))*x.^(k+n-2*p);
end
n=n+1;
end
z=(-1)^(p+k)*product(k)/(product(k-p)*product(p));
y=y+z*sum1;
end
从以上程序得不出我想要的表达式,我本来想把数学表达式贴上来,但是无法贴,请高手帮忙看能否看出问题