필터 지우기
필터 지우기

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 CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by