早教吧作业答案频道 -->其他-->
用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求二元二次方程...的网友还看了以下:
非线性方程的解学妹感激不尽.t1*cos(a1)*cos(a2)+t2*sin(a1)*cos(a 2020-04-26 …
若集合A1,A2满足A1∪A2=A,则称(A1,A2)为 集合A的一种分拆,并规定:当且仅当A1= 2020-05-15 …
设|A|是三阶矩阵,A=(a1,a2,a3)则|A|=?A.|a1-a2,a2-a3,a3-a1| 2020-05-16 …
非负实数a1,a2,……an满足a1+a2+……an=1,求 a1÷(1+a2+a3+……+an) 2020-05-16 …
周期信号的正玄展开如何得到直流偏移,幅度,频率和相位角啊?c(t)=a0+a1*sin(w1(t) 2020-07-02 …
EXCEL如果A1=1,那么B1=A2,如果A1=2,那么B1=A2+B2...IF函数超七层如果 2020-07-09 …
问一道数学归纳题!已知对于任意正数a1,a2,a3,有不等式已知对于任意正数a1,a2,a3,有不 2020-07-26 …
设a1,a2,a3,a4是齐次线性方程组Ax=0的一个基础解系,则下列向量组中不再是Ax=0的基础 2020-08-02 …
Matlab求解三角函数的周期如题,f(x)=a1*sin(b1*x+c1)+a2*sin(b2*x 2020-10-31 …
若集合A1,A2满足A1∪A2=A,则称(A1,A2)为集合的分拆,求集合A={a,b,c}的不同种 2020-11-08 …