% Solving a stiff ODE in Chemical Engineering.

clear all;
% Pass function handle @stiffFcn to MATLAB's ODE solver for stiff
% first order ODEs, ode15s, 
[t, Conc] = ode15s(@stiffFcn, [0, 4], [1, 0, 0]);
% An older approach is to pass the function name as a string to the ODE
% solver.
% This still works, some older programs still use this method.
% But it is not as efficient and so you should not use it:
% [t, Conc] = ode15s('stiffFcn', [0, 4], [1, 0, 0]);

plot(t,Conc); 