用matlab求二元二次方程组的解,程序如下,十万火急!大神请帮忙纠错!
symsxyL1L2L3L4a1a2L5a3a4eq1=solve('(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*si...
syms x y L1 L2 L3 L4 a1 a2 L5 a3 a4
eq1=solve('(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2')
eq2=solve('(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2')
[x,y]=solve(eq1,eq2,x,y) 展开
eq1=solve('(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2')
eq2=solve('(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2')
[x,y]=solve(eq1,eq2,x,y) 展开
2个回答
展开全部
你的问题出错在于
1、变量赋值错误。eq1和eq2应改为
eq1='(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2';
eq2='(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2';
2、solve()函数格式不对。应改为[x,y]=solve(eq1,eq2,‘x’,‘y’)
正确代码为
>> syms x y L1 L2 L3 L4 a1 a2 L5 a3 a4
>> eq1='(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2';
>> eq2='(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2';
>> [x,y]=solve(eq1,eq2,'x','y')
x =。。。
y=。。。
1、变量赋值错误。eq1和eq2应改为
eq1='(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2';
eq2='(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2';
2、solve()函数格式不对。应改为[x,y]=solve(eq1,eq2,‘x’,‘y’)
正确代码为
>> syms x y L1 L2 L3 L4 a1 a2 L5 a3 a4
>> eq1='(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2';
>> eq2='(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2';
>> [x,y]=solve(eq1,eq2,'x','y')
x =。。。
y=。。。
厦门鲎试剂生物科技股份有限公司
2023-08-01 广告
2023-08-01 广告
计算过程如下:首先,计算4个数值的和:∑Xs = 0.3 + 0.2 + 0.4 + 0.1 = 1然后,计算 lg-1(∑Xs/4):lg-1(∑Xs/4) = lg-1(1/4) = -1其中,lg表示以10为底的对数,即 log10。...
点击进入详情页
本回答由厦门鲎试剂生物科技股份有限公司提供
展开全部
clear all;clc;
syms x y
global L1 L2 L3 L4 a1 a2 L5 a3 a4
[x y]=solve('(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2','(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2');
L1 L2 L3 L4 L5 a1 a2 a3 a4带入你自己的值就好了
谢谢采纳
syms x y
global L1 L2 L3 L4 a1 a2 L5 a3 a4
[x y]=solve('(x-(L3*cos(a3)-L1*cos(a1)))^2+(y-(L3*sin(a3)+L1*sin(a1)))^2=L3^2','(x-(L5+L2*cos(a2)))^2+(y-(L1*sin(a1)))^2=L5^2');
L1 L2 L3 L4 L5 a1 a2 a3 a4带入你自己的值就好了
谢谢采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询