Hi,
there is an equation:
cos(x) + B*sin(x) = C
and also an expression:
-sin(x) + B*cos(x)
I want to know if we can rewirte the expression in a way to omit "x". I could't do it manually. I wanted to know if there is any way in Matlab.
Thanks

2 件のコメント

Benjamin Thompson
Benjamin Thompson 2023 年 1 月 23 日
So you want to solve the equation for 'x'?
Mtnkh
Mtnkh 2023 年 1 月 24 日
Yes!

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2023 年 1 月 23 日

1 投票

syms B C x
eqn = cos(x) + B*sin(x) == C
eqn = 
expr = -sin(x) + B*cos(x)
expr = 
xsol = solve(eqn,x)
xsol = 
newexpr = simplify(subs(expr, x, xsol))
newexpr = 

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

質問済み:

2023 年 1 月 23 日

コメント済み:

2023 年 1 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by