% This is a function file for the Lorenz equations (DMA, 5-28-07)
%
% t is the time and y is a vector with components (y1,y2,y3).
%
function yrhs=fun_lorenz(t,y)
%
% define parameter values
%
sigma=10;
b=8/3;
r=14;
%
%
%
yrhs1=sigma*(y(2)-y(1));
yrhs2=r*y(1)-y(2)-y(1)*y(3);
yrhs3=y(1)*y(2)-b*y(3);
%
yrhs=[yrhs1;yrhs2;yrhs3];
