>> s = solve(x^2 - 2 * x - 2 * y * x + 4 * y, x^2 - 6 * x + 5)
s =
x: [2x1 sym]
y: [2x1 sym]
>> s.x
ans =
[1]
[5]
>> s.y
ans =
[1/2]
[5/2]
11.2.8 Solving Differential Equations
The function dsolve computes symbolic solutions to ordinary differential equations. The syntax
of dsolve is somewhat different than most other functions in MATLAB. Arguments to dsolve
must be character strings representing equations, that is, strings containing an equal sign (=).
This is different from the syntax of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.