求助用MATLAB求解如下三角函数方程组,最好有源程序L2*sin(θ2)-L3*sin(θ3)-A+L1*sin(θ1)=0L2*cos(θ2)-L3*cos(θ3)-B+L1*cos(θ1)=0其中,L1=0.1、L2=0.4、L3=0.22、A=0.3、B=-0.35,变量为θ2、θ3目的:当θ1分别等于0,2,4,·

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/21 03:23:39

求助用MATLAB求解如下三角函数方程组,最好有源程序L2*sin(θ2)-L3*sin(θ3)-A+L1*sin(θ1)=0L2*cos(θ2)-L3*cos(θ3)-B+L1*cos(θ1)=0其中,L1=0.1、L2=0.4、L3=0.22、A=0.3、B=-0.35,变量为θ2、θ3目的:当θ1分别等于0,2,4,·
求助用MATLAB求解如下三角函数方程组,最好有源程序
L2*sin(θ2)-L3*sin(θ3)-A+L1*sin(θ1)=0
L2*cos(θ2)-L3*cos(θ3)-B+L1*cos(θ1)=0
其中,L1=0.1、L2=0.4、L3=0.22、A=0.3、B=-0.35,变量为θ2、θ3
目的:当θ1分别等于0,2,4,······,360(即θ1从0到360两度一间隔取值)时,求出变量θ2、θ3的值
请不吝赐教,给出MATLAB源程序,

求助用MATLAB求解如下三角函数方程组,最好有源程序L2*sin(θ2)-L3*sin(θ3)-A+L1*sin(θ1)=0L2*cos(θ2)-L3*cos(θ3)-B+L1*cos(θ1)=0其中,L1=0.1、L2=0.4、L3=0.22、A=0.3、B=-0.35,变量为θ2、θ3目的:当θ1分别等于0,2,4,·
theta = 0:2:360;
L = length(theta);
SolvedTheta = zeros(L,2);
for i = 1:L

f = @(theta,theta1)([ 0.4*sin(theta(1))-0.22*sin(theta(2))-0.3+0.1*sin(theta1) ...
0.4*cos(theta(1))-0.22*cos(theta(2))+0.35+0.1*cos(theta1)]);
options = optimset('TolFun',0.01,'Display','off');
SolvedTheta(i,:) = fsolve(f,[0,0],options,theta(i));
end
SolvedTheta
结果:
SolvedTheta =
2.1837 0.1401
1.9472 0.9019
1.7350 0.0957
2.1695 0.0155
2.0349 0.7966
1.6970 0.2042
2.1180 -0.0580
2.0663 0.7687
1.6851 0.3348
2.0624 0.0165
2.1320 0.6402
1.7015 0.5006
2.0070 -0.0621
2.1604 0.5343
1.7169 0.5559
1.9396 -0.0800
2.1449 0.3909
1.8099 0.7113
1.8666 -0.0541
2.1885 0.2686
1.8906 0.7826
1.7966 0.0048
2.1844 0.1472
1.9434 0.9011
1.7381 0.0896
2.1707 0.0229
2.0317 0.7983
1.6987 0.1968
2.1190 -0.0527
2.0659 0.7700
1.6850 0.3258
2.0654 0.0240
2.1298 0.6465
1.6999 0.4883
2.0109 -0.0592
2.1590 0.5410
1.7097 0.5457
1.9440 -0.0803
2.1419 0.3987
1.8049 0.7058
1.8711 -0.0567
2.1779 0.2666
1.8856 0.7793
1.8007 0.0003
2.1148 0.2157
1.9397 0.9002
1.7412 0.0836
2.1718 0.0306
2.0283 0.8000
1.7004 0.1895
2.1198 -0.0474
2.0652 0.7713
1.6850 0.3171
2.0684 0.0319
2.1276 0.6527
1.6983 0.4764
2.0147 -0.0561
2.1575 0.5478
1.7031 0.5359
1.9485 -0.0804
2.1387 0.4063
1.8000 0.7003
1.8757 -0.0593
2.1881 0.2844
1.8805 0.7757
1.8049 -0.0041
2.1857 0.1617
1.9359 0.8991
1.7445 0.0778
2.1728 0.0387
2.0249 0.8015
1.7023 0.1822
2.1203 -0.0418
2.0642 0.7728
1.6851 0.3084
2.0712 0.0401
2.1253 0.6588
1.6967 0.4648
2.0185 -0.0527
2.1560 0.5545
1.6969 0.5265
1.9529 -0.0804
2.1735 0.4500
1.7950 0.6946
1.8803 -0.0617
2.1878 0.2924
1.8755 0.7721
1.8091 -0.0084
2.1862 0.1690
1.9321 0.8978
1.7478 0.0719
2.1737 0.0473
2.0213 0.8029
1.7043 0.1751
2.1207 -0.0361
2.0631 0.7744
1.6853 0.2998
2.0741 0.0488
2.1230 0.6649
1.6952 0.4535
2.0222 -0.0490
2.1545 0.5613
1.7259 0.5445
1.9573 -0.0802
2.1728 0.4561
1.7922 0.6839
1.8849 -0.0640
2.1875 0.3004
1.8704 0.7682
1.8133 -0.0126
2.1337 0.2613
1.9283 0.8963
1.7512 0.0662
2.1744 0.0565
2.0176 0.8042
1.7063 0.1680
2.1207 -0.0303
2.0617 0.7761
1.6857 0.2913
2.0769 0.0578
2.1206 0.6709
1.6938 0.4425
2.0258 -0.0451
2.1529 0.5680
1.7074 0.6759
1.9616 -0.0797
2.1285 0.4284
1.7892 0.6732
1.8895 -0.0661
2.1872 0.3084
1.8654 0.7642
1.8176 -0.0167
2.1871 0.1838
1.9245 0.8947
1.7546 0.0606
2.1749 0.0665
1.9846 0.9004
1.7085 0.1610
2.1240 0.0471
2.0601 0.7779
1.6862 0.2829
2.0796 0.0673
2.1182 0.6768
1.6925 0.4317
2.0294 -0.0410
2.1512 0.5747
1.7097 0.6555
1.9659 -0.0792
2.1714 0.4685
1.7857 0.6634
1.8941 -0.0681
2.1868 0.3164
1.8603 0.7601
1.8219 -0.0206
2.1875 0.1913
1.8601 0.7180
1.7582 0.0550
2.1754 0.0765
1.9809 0.9013
1.7108 0.1541
2.1200 -0.0182
2.0583 0.7797
1.6868 0.2747
2.0823 0.0771
2.1158 0.6826
1.6913 0.4212
2.0330 -0.0365
2.1495 0.5814
1.7109 0.6363
1.9702 -0.0784
2.1211 0.4424
1.7030 0.5664
1.8987 -0.0700
2.1746 0.3884
1.8552 0.7558
1.8263 -0.0245
2.1878 0.1988
1.8539 0.7144
1.7617 0.0496
2.1762 0.0850
1.9772 0.9020