필터 지우기
필터 지우기

I need help with Range equation and range error

조회 수: 1 (최근 30일)
University Student
University Student 2021년 2월 2일
답변: Walter Roberson 2021년 2월 3일
I have set up these values in matlab. I need help finding the jacobian matrix for the system. Can I just use the jacobian function provided by matlab?
I also need help with solving for the expected solution uncertainty (1-sigma.
This equation should solve for x and y correct? I need to solve for this as well.
Finally how can I put this solution in a monte carlo simulation?
a = [0 10 0 10];
b = [0 0 10 10];
r = [25 45 65 85];
range_error = 0.5
(r^2)=((x-a)^2) + ((y-b)^2));

채택된 답변

Walter Roberson
Walter Roberson 2021년 2월 3일
syms a b x y r
eqn = (x-a)^2 + (y-b)^2 - r^2
eqn = 
J = jacobian(eqn, [x y])
J = 
syms tolp toln
assume(tolp > 0 & toln > 0)
range_error = 0.5
range_error = 0.5000
eqn1 = eqn + tolp - range_error^2
eqn1 = 
eqn2 = eqn - toln - range_error^2
eqn2 = 
J1 = jacobian(eqn1, [x y])
J1 = 
J2 = jacobian(eqn2, [x y])
J2 = 
What I did was transform
%sqrt((x-a)^2 + (y-b)^2) = r + delta, -range_error <= delta <= range_error
into equalities, giving a name to the difference between the ideal match and the actual match; split it into two parts, one with a positive difference and one with a negative difference, and require that the variable be positive. Like A > B means that A = B + delta where delta > 0. MATLAB is a lot more comfortable reasoning about equalities and then eliminating the branches that would violate the assume(), than it is trying to solve inequalities.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by