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 Kommentare

Benjamin Thompson
Benjamin Thompson am 23 Jan. 2023
So you want to solve the equation for 'x'?
Mtnkh
Mtnkh am 24 Jan. 2023
Yes!

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 23 Jan. 2023

1 Stimme

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 = 

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 23 Jan. 2023

Kommentiert:

am 24 Jan. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by