用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
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/16 23:42:24
用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)
用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
你的问题出错在于
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=.
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带入你自己的值就好了
谢谢采纳