How to avoid rounding off errors in parametrization?
이전 댓글 표시
Hello everyone. I am parametrizing the function of a conic: Ax^2 + By^2 + Cxy + Dx + Ey + F = 0
The goal is to get the equation to the form: x^2/a^2 + y^2/b^2 = 1
One of the steps of the parametrization corresponds to rotating and scaling about the origin, i.e., eliminate the component of xy.
This is not working very well due to roundoff errors. Being C ~= 0, here is what I have to do:
x->qx+y; y->qy-x
where
q = sqrt(((B-A)/C)^2+1) + (B-A)/C;
When I do this replacement, the xy component doesn't really disappear, it actually becomes something like
1E-5*x*y
This corrupts all of the following algorithm of the parametrization. Any ideas of how to avoid this probelm?
Thank You.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!