normal_ode, a MATLAB code which sets up and solves an ordinary differential equation (ODE) for the normal probability density function (PDF).
The normal probability density function (PDF) can be written as
y(t) = 1/sqrt(2 pi) e^(-t^2/2)The derivative of the normal PDF is
y'(t) = -t/sqrt(2 pi) e^(-t^2/2) = - t * y(t)
Thus, along with an initial condition, an ODE for the normal PDF can be written either as:
y'(t) = -t/sqrt(2 pi) e^(-t^2/2)or
y'(t) = -t * y(t)While both of these ODE's have the same solution, an ODE solver will generally have more difficulty solving the second version.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
normal_ode is available in a MATLAB version and an Octave version and a Python version.
matlab_ode, MATLAB codes which set up various ordinary differential equations (ODE).