ODE45 problem. How to change the initial conditions?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hi. I am still pretty new to Matlab and was wondering if anyone could help me with the following problem.
I have the following function file:
function Sxint = fnc(c)
options = odeset('RelTol', 0.0001);
sol = ode45(@phase,[-1, 1],[0;1],options,c);
xint = 1; p = deval(sol,xint); Sxint = p(1); format short
I have defined all unknown values in different files but I think they are irrelevant for my question anyway.
My initial condition is y(-1)=0 and y'(-1)=1. I have been looking through the documentation here and all the examples have boundary conditions from 0 on(e.g[0, 20]) so I want to know if I have to change my initial conditions relevant to my boundaries or does Matlab do it automatically? Any help would be great as this is urgent.
Thanks, Ben
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!