Solve systems of eqns
Show older comments
Hi, I tried solving a system for:
if true
% code
end
eqns = h^2*[diff(y,t)+2*i*g*y+g^2==0, diff(z,t)==y];
sol = dsolve(eqns)
and get:
>> Solve_Systems_of_ODE
h = 2 g =
5
sol =
struct with fields:
z: [1×1 sym]
y: [1×1 sym]
what does this result mean really?
Thanks
10 Comments
John D'Errico
on 8 Dec 2017
Edited: John D'Errico
on 8 Dec 2017
I'm a bit mystified. Are you asking someone to explain ordinary differential equations? That usually takes place in an entire semester long course at the undergraduate level.
y is dz/dt, so this is a second order ODE. Someone has converted that 2nd order ODE into a system of first order ODEs.
So what is it that you don't follow?
Sergio Manzetti
on 8 Dec 2017
John D'Errico
on 8 Dec 2017
z and y will be functions of t. They are the solution to the differential equation posed, IF it has a solution. As I said, the way it was defined, you have created y as dz/dt, so a second order ODE.
But I am still mystified as to your question "What does the output mean?" z and y will be the solution to the ODE system posed.
Did you look at sol.z and sol.y?
Sergio Manzetti
on 8 Dec 2017
Sergio Manzetti
on 8 Dec 2017
Sergio Manzetti
on 8 Dec 2017
Karan Gill
on 8 Dec 2017
Karan (Symbolic doc)
Sergio Manzetti
on 8 Dec 2017
Karan Gill
on 11 Dec 2017
What's your MATLAB version on the computer?
Sergio Manzetti
on 12 Dec 2017
Accepted Answer
More Answers (1)
Sergio Manzetti
on 8 Dec 2017
3 Comments
Sergio Manzetti
on 8 Dec 2017
Edited: Sergio Manzetti
on 8 Dec 2017
Birdman
on 8 Dec 2017
Do you mind if I look at this at weekend?
Sergio Manzetti
on 8 Dec 2017
Edited: Sergio Manzetti
on 8 Dec 2017
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!