Initial conditions of the ODE
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
|Mandatory||List of arithmetical expressions|
InitialConditions = [y1(t0),
y2(t0), …] sets
the initial conditions for the initial value problem
TimeMesh = [t0, t1,
t2, …] sets the values of
the independent variable t (the
“time”) of the ODE at which graphical points of the
solution curve are plotted. The first entry
the initial time for which initial conditions are set by
We solve the initial value problem numerically:
f := (t, Y) -> [-Y]: Y0 := : timemesh:= [0, 0.2, 0.5, 1, 1.5, 2, 3, 5]: plot(plot::Ode2d(f, InitialConditions = Y0, TimeMesh = timemesh))
delete f, Y0, timemesh: