早教吧作业答案频道 -->其他-->
用matlab求二元二次方程组的解,程序如下,十万火急!syms x y L1 L2 L3 L4 a1 a2 L5 a3 a4eq1=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(eq
题目详情
用matlab求二元二次方程组的解,程序如下,十万火急!
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)
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)
▼优质解答
答案和解析
你的问题出错在于
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=.
看了 用matlab求二元二次方程...的网友还看了以下:
计算 n+1阶行列式,Dn+1=[x a1 a2 a3...an;a1 x a2 a3...an; 2020-05-16 …
直线l过点A(-1,1),它被两平行线l1:x+2y-1=0和l2:x+2y-3=0截得的线段中点 2020-05-23 …
已知关于x的二次方程x平方+n平方x+n-1=0(n为自然数,且n≥2),当n=2时,此方程的两根 2020-06-02 …
若(x^2+1)(x-3)^9=a0+a1(x-2)+a2(x-2)^2+a3(x-2)^3……+ 2020-06-03 …
用matlab求二元二次方程组的解,程序如下,十万火急!syms x y L1 L2 L3 L4 2020-06-27 …
1.{an}为等差数列,公差d不等于0,若a3^2=a1*a9,求(a1+a3+a9)/(a2+a 2020-07-09 …
解向量方程2向量x-3(向量x-2向量a)=向量0方程组5向量x+2向量y=向量a3向量x-向量y 2020-07-17 …
|a1-a2|x2+|a1-a3|x3+|a1-a4|x4=1|a2-a1|x1+|a2-a3|x 2020-07-21 …
是李修福的1.解方程组①4xy+9yz=123yz-2zx=17xy+5zx=4②1/x+1/y=a 2020-10-31 …
已知c条直线l5:了x-y+a=0(a>0),直线l了:-6x+了y+5=0和直线l3:x+y-5= 2020-11-01 …