フィルターのクリア

Solving ODE with multiple initial conditions

2 ビュー (過去 30 日間)
Gregory Woodhall
Gregory Woodhall 2019 年 4 月 12 日
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 :)

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by