How can I solve two nonlinear equations?

I have two equations:
1: x1+x2=a-b*cos(th)
2: x1^2+x2^2=c-d*cos(th)
where th is the inputvariable; a,b,c,d are constants; and x1 and x2 are the output variables. How can I solve these equations using matlab such that I get two separate symbolic expressions for x1 and x2, as a function of th? Thank you in advance,

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 4월 15일
편집: Azzi Abdelmalek 2013년 4월 15일

0 개 추천

syms x1 x2 a b c d th
solve(x1+x2-(a-b*cos(th)), x1^2+x2^2-(c-d*cos(th)),x1,x2)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

질문:

2013년 4월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by