用solve()函数求解四元一次方程组。代码如下
syms x3 x4 y3 y4 t
x1=19/64;y1=0;x2=1;y2=57/64;
eq1=x3*cos(t)+y3*sin(t)-x1;
eq2=y3*cos(t)+x3*sin(t)-y1;
eq3=x4*cos(t)+y4*sin(t)-x2;
eq4=y4*cos(t)+x4*sin(t)-y2;
eq5=(y4-y3)/(x4-x3)-tan(t);
s=solve(eq1,eq2,eq3,eq4,eq5,'x3','x4','y3','y4','t')
double(s.t)
double(s.x3)
double(s.x4)
double(s.y3)
double(s.y4)