Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

ODE45 problem. How to change the initial conditions?

1 Ansicht (letzte 30 Tage)
Ben
Ben am 3 Apr. 2013
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

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by