%% Function Handle Suitable for ODE Solvers
%% 1

syms y(t)
eqn = diff(y(t), t, t) == (1 - y(t)^2)*diff(y(t),t) - y(t);
[eqs,vars] = reduceDifferentialOrder(eqn,y(t));
initConditions = [2,0];
[M,F] = massMatrixForm(eqs,vars);
f = M\F

%
%% 2

odefun = odeFunction(f,vars);
ode15s(odefun, [0 10], initConditions)

% Copyright 2012 The MathWorks, Inc.