options = odeset('RelTol', 1e-4, 'NonNegative', [1 2 3]);

% Use ode45 to solve our ODE
% Place the time points in a vector 't'
% Place the solution in a vector 'x'
[t,x] = ode15s('sir', [0 10], [1500 3 0], options);
plot(t,x);
legend('S', 'I', 'R');