|
楼主 |
发表于 2006-3-15 17:29
|
显示全部楼层
<P>还是上次的源代码,当执行到b1=int(2*w,t,0,8)这个语句时,前面都可以执行,这句需要很长时间(几个小时吧),然后要么退出,要么就出现ans=NaN。改用数值积分b1=quadl(2*w,t,0,8),就出现了下面的信息:<BR>??? Error using ==> fcnchk<BR>If FUN is a MATLAB object, it must have an feval method.</P>
<P>Error in ==> quadl at 54<BR>f = fcnchk(funfcn);<BR>怎么回事呀?<BR><BR>源程序:<BR>syms z<BR>a=[z^2/34^2,z^3/34^3,z^4/34^4]<BR>a1=diff(a)<BR>a2=diff(a1)<BR>m=int((212160-858*z)*a'*a,0,34)<BR>kesi=int((212160-858*z)*a',0,34)<BR>p=-kesi*2.383*10^-2<BR>r=int(2.1*10^11*(29.962-0.702*z)*a2'*a2,0,34)<BR>k2=-int(10^6*a1'*a1,0,34)<BR>k=r+k2<BR>syms t<BR>e=k-t^2*m<BR>d=-0.1*k<BR>i=d*d+e*e<BR>yi=inv(i)*d*p<BR>yr=inv(i)*e*p<BR>x=yr(1)+yr(2)+yr(3)<BR>y=yi(1)+yi(2)+yi(3)<BR>w=x^2+y^2<BR>b1=int(2*w,t,0,8)<BR>b2=int(2*t^2*w,t,0,8)<BR>double(b1)<BR>double(b2)<BR>z=34<BR>a2 =[1/578,3/19652*z,3/334084*z^2]<BR>x1=a2(1)*yr(1)+a2(2)*yr(2)+a2(3)*yr(3)<BR>y1=a2(1)*yi(1)+a2(2)*yi(2)+a2(3)*yi(3)<BR>w1=x1^2+y1^2<BR>wj1=12.8*10^11*int(2*w1,t,0,8)<BR>wj2=12.8*10^11*int(2*t^2*w1,t,0,8)<BR>double(wj1)<BR>double(wj2)<BR><BR></P><BR>[em03] |
|