function dy = epi1(t,y) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % function dy = epi1(t,y) % % Solution to CSE Your Homework Assignment Project 6 % % More Models of Infection: It's Epidemic % % epi1.m Dianne P. O'Leary 11/03 % % % % This program evaluates dy/dt for the ODE model of % % Problem 1. % % The y vector has 3 components: % % infected, susceptible, and recovered. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% global mytrans myrecov inf = y(1); sus = y(2); rec = y(3); dy(1,1) = mytrans*inf*sus - inf/myrecov; dy(2,1) = - mytrans*inf*sus; dy(3,1) = inf/myrecov;