Borrar filtros
Borrar filtros

Solving ODE with multiple initial conditions

2 visualizaciones (últimos 30 días)
Gregory Woodhall
Gregory Woodhall el 12 de Abr. de 2019
So I know people on these forums dont usually like to help people with homework quesitons, but I am genuinely stuck and any hints would be appriciated.
Question2.JPG
So far I have managed to produce the code bellow;
%Using y for theta and x for t
clear,clc,close;
g=9.81;
L=1;
syms y(x)
Eqn1='D2y+((g/L)*sin(y))=0';
Inits='[y(0)=[0.5;0.8],Dy(0)=[0;0]]';
y=dsolve(Eqn1,Inits);
This code returns an error, previously I could get it to run with a single input for both y(0) and Dy(0), but this would not be enough information for matlab to solve the equation so I would be returned with an error stating that no explicit solutions could be found.
After searching for help else where I was told that my answers had to be inputted as a vector, if this is true where am I going wrong?
Thanks for any help :)

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by