Solve for a variable in terms of specific other variables
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aleem Andrew
am 23 Feb. 2021
Beantwortet: Walter Roberson
am 23 Feb. 2021
The derivative of eq1 below is diff(x(t), t) == diff(y(t), t). I am trying to use the solve function to solve for diff(y(t)) and the output should be diff(x(t)) but a message stating that Matlab is unable to find an explicit solution is displayed. How can you specify the value of diff(x(t)), for example diff(x(t)) = 5, so that the solve function will solve for diff(y(t)) as 5, or if the value is not specified the solve function should return diff(x(t)) rather than an empty sym?
syms x(t) y(t)
eq1 = x == y+2;
solve(diff(eq1),diff(y(t)))
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 23 Feb. 2021
syms x(t) y(t)
eq1 = x == y+2;
deq = diff(eq1)
isolate(deq, diff(y))
subs(ans, diff(x),5)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!