|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
大家帮忙给看看吧,都折腾俺一个月的DD了。
要解个3元的非线性方程,未知数 a b c
function neu=fun(T)
a=T(1);
b=T(2);
c=T(3);
R=6400*10^3;
g=9.81;
E=2.1*10^11;
l=7.2*10^7;
rho=7850;
omega=2*pi/(24*3600);
syms x
u=a*sin(1*pi/l*x)+b*sin(3*pi/l*x)+c*sin(5*pi/l*x);
du=diff(u,x);
x=subs(x);
x=0:10^4:72*10^6;
p11=int((x.^2+u^2+R^2+2*x*R+2*x*u+2*R*u)*sin(1*pi/l*x),x,0,l);
p21=int((x.^2+u^2+R^2+2*x*R+2*x*u+2*R*u)*sin(3*pi/l*x),x,0,l);
p31=int((x.^2+u^2+R^2+2*x*R+2*x*u+2*R*u)*sin(5*pi/l*x),x,0,l);
p12=int(du*pi/l*cos(pi/l*x),x,0,l);
p22=int(du*3*pi/l*cos(3*pi/l*x),x,0,l);
p32=int(du*5*pi/l*cos(5*pi/l*x),x,0,l);
p13=int(sin(1*pi/l*x)/(x.^2+u^2+R^2+2*x*R+2*x*u+2*R*u),x,0,l);
p23=int(sin(3*pi/l*x)/(x.^2+u^2+R^2+2*x*R+2*x*u+2*R*u),x,0,l);
p33=int(sin(5*pi/l*x)/(x.^2+u^2+R^2+2*x*R+2*x*u+2*R*u),x,0,l);
neu=[rho*omega^2*p11-E*p12-rho*g*R^2*p13;
rho*omega^2*p21-E*p22-rho*g*R^2*p23;
rho*omega^2*p31-E*p32-rho*g*R^2*p33];
然后我在Command里引用
>> x0=[0;0;0];
>> options=optimset('Display','iter','Tolfun',1.0e-008, 'MaxFunEvals',1e20);
>> T=fsolve(@fun,x0,options);
一直有错误
??? Error using ==> sym.maple
Error, (in int) wrong number (or type) of arguments
Error in ==> sym.int at 51
r = reshape(maple('map','int',f(:),[x.s '=(' a.s ')..(' b.s ')']),size(f));
Error in ==> fun at 16
p11=int((x.^2+u^2+R^2+2*x*R+2*x*u+2*R*u).*sin(1*pi/l*x),x,0,l);
Error in ==> fsolve at 180
fuser = feval(funfcn{3},x,varargin{:});
[ 本帖最后由 eight 于 2007-11-22 11:31 编辑 ] |
|