solve求方程组的问题 。
이전 댓글 표시
syms C1 C2 C3 x y;
c1=[2.0810;3.6763];c2=[1.7604;4.9588];
xc=2;%yc=4;
yc=(xc-c1(1))/(c2(1)-c1(1))*(c2(2)-c1(2))+c1(2);
f=C1*x^2+C2*x*y+C3*y^2-(2*C1*xc+C2*yc)*x-(2*C3*yc+C2*xc)*y+(C1*xc^2+C2*xc*yc+C3*yc^2-1);
y1=7.3080*x;
t1=subs(f,y,y1);
d1=coeffs(collect(vpa(t1)),x);
deta1=d1(2)^2-4*d1(3)*d1(1)
y2=0.9744*x;
t2=subs(f,y,y2);
d2=coeffs(collect(vpa(t2)),x);
deta2=d2(2)^2-4*d2(3)*d2(1)
y3=-0.6943*x+4.1660;
t3=subs(f,y,y3);
d3=coeffs(collect(vpa(t3)),x);
deta3=d3(2)^2-4*d3(3)*d3(1)
[C1,C2,C3]=solve(deta1,deta2,deta3)
为什么这样求出来的解是错误的,而如果把yc=4,就能求出正解,但是yc=(xc-c1(1))/(c2(1)-c1(1))*(c2(2)-c1(2))+c1(2)也是等于4的呀。
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!