Solve systems of eqns
Afficher commentaires plus anciens
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 commentaires
John D'Errico
le 8 Déc 2017
Modifié(e) : John D'Errico
le 8 Déc 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
le 8 Déc 2017
John D'Errico
le 8 Déc 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
le 8 Déc 2017
Sergio Manzetti
le 8 Déc 2017
Sergio Manzetti
le 8 Déc 2017
Karan Gill
le 8 Déc 2017
Karan (Symbolic doc)
Sergio Manzetti
le 8 Déc 2017
Karan Gill
le 11 Déc 2017
What's your MATLAB version on the computer?
Sergio Manzetti
le 12 Déc 2017
Réponse acceptée
Plus de réponses (1)
Sergio Manzetti
le 8 Déc 2017
3 commentaires
Sergio Manzetti
le 8 Déc 2017
Modifié(e) : Sergio Manzetti
le 8 Déc 2017
Birdman
le 8 Déc 2017
Do you mind if I look at this at weekend?
Sergio Manzetti
le 8 Déc 2017
Modifié(e) : Sergio Manzetti
le 8 Déc 2017
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!