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 ExchangeNonlinear Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by