matlab解方程组,感激不尽.S3*COS(A3)=150cos(A1);S3*SIN(A3)=480+150SIN(A1);810COS(A3)+200COS(A4)-S=0;810SIN(A3)+200SIN(A4)=790A1=0,10,20,30,40,.360,求S S3 A3 A4
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 16:28:02
matlab解方程组,感激不尽.S3*COS(A3)=150cos(A1);S3*SIN(A3)=480+150SIN(A1);810COS(A3)+200COS(A4)-S=0;810SIN(A3)+200SIN(A4)=790A1=0,10,20,30,40,.360,求S S3 A3 A4
matlab解方程组,感激不尽.
S3*COS(A3)=150cos(A1);
S3*SIN(A3)=480+150SIN(A1);
810COS(A3)+200COS(A4)-S=0;
810SIN(A3)+200SIN(A4)=790
A1=0,10,20,30,40,.360,求S S3 A3 A4
matlab解方程组,感激不尽.S3*COS(A3)=150cos(A1);S3*SIN(A3)=480+150SIN(A1);810COS(A3)+200COS(A4)-S=0;810SIN(A3)+200SIN(A4)=790A1=0,10,20,30,40,.360,求S S3 A3 A4
你用的是Mathematica吗?这个问题用Matlab很好解决的.我编程试了一下,求了A1=0时的解.代码如下:
function E=myfunc(x)
A1=0;
S=x(1); S3=x(2); A3=x(3); A4=x(4);
E=[S3*cos(A3)-150*cos(A1);
S3*sin(A3)-480-150*sin(A1);
810*sin(A3)+200*sin(A4)-S;
810*sin(A3)+200*sin(A4)-790;];
上面的保存后,下面的代码在命令窗口输入:
x0=[1 1 1 1];
opt=optimset('Display','iter','MaxFunEvals',15000,'MaxIter',2000);
[r,val]=fsolve(@myfunc,x0,opt)
结果为:
r =
790.0000 502.8916 1.2679 0.0845
val =
1.0e-010 *
0.0003
0
-0.5559
-0.5559
你可以验证结果的正确性.改变A1的值,就可以得到其他的结果.