Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

ODE45 problem. How to change the initial conditions?

1 vue (au cours des 30 derniers jours)
Ben
Ben le 3 Avr 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

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by