四元二次方程组运行总是错。。求解救!!!。
4 views (last 30 days)
Show older comments
clc;clear all;
syms x y z x1 y1 x2 y2
u0=217/2;
v0=217/2;
u1=34;
v1=72;
u2=158;
v2=25;
u3=15;
v3=36;
u4=88;
v4=39;
x11=(u1-u0)*(1/72)*2.54;
y11=(v1-v0)*(1/72)*2.54;
x21=(u2-u0)*(1/72)*2.54;
y21=(v2-v0)*(1/72)*2.54;
C=sqrt((u3-u4)^2+(v3-v4)^2);
l=1;
d=0.5/2;
L=2.6;
wudian=[x,y,z];
kong1=[d,0,0];
kong2=[-d,0,0];
xiangdian1=[x1,y1,L];
xiangdian2=[x2,y2,L];
eq1=(x1-x2)^2+(y1-y2)^2=((2*d*(l+L))/l)^2;
eq2=(x1-2.9)^2+(y1-2.9)^2=((x11-u0)^2+(y11-vo)^2)/C^2);
eq3=(x2-2.9)^2+(y2-2.9)^2=((x21-u0)^2+(y21-vo)^2)/C^2);
eq4=(x1-x2)^2+(y1-y2)^2=((x11-x21)^2+(y11-y21)^2)/C^2);
[x1,y1,x2,y2]=solve(eq1,eq2,eq3,eq4)
x=(x1*d+x1*x2+x2*d-x2*x1)/(2*d+x2-x1)
y=(y1*d-y1*x)/(d-x1)
z=(L*d-L*x)/(d-x1)
D= sqrt( (x2-x1)^2+(y2-y1)^2+(L-L)^2 )
DX=(sqrt((u1-u2)^2+(v1-v2)^2))/C
求X1 Y1 X2 Y2的那里是不是有问题?要怎么修改呢?
0 Comments
Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!