I want to express y(t) in terms of x(t). For example:
syms x(t) y(t) t
eq=x+2*y==10;
solve(eq,y)
The code gives the following error:
Warning: Unable to find explicit solution. For options, see help. Empty sym: 0-by-1
I would like to have this y(t)=(10-x(t))/2 becasuse then i'm going to combine this equation with others that are differential in function of t.
Thanks.

 Akzeptierte Antwort

Star Strider
Star Strider am 31 Aug. 2021
Use isolate instead of solve in this instance —
syms x(t) y(t) t
eq=x+2*y==10;
soln = isolate(eq,y)
soln = 
LHS = lhs(soln)
LHS = 
RHS = rhs(soln)
RHS = 
.

Weitere Antworten (0)

Kategorien

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

Produkte

Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by