clear all close all %% Set Params and ODE options params = strcat('paramsSIP'); [pS, iS, tS] = eval(params); t = tS{1}:tS{2}:tS{3}; %time-vector options = odeset('RelTol',1e-5); [x,y] = ode23t(@SIP,t,[iS{:,1}],options,[pS{:,1}]); subplot 321 plot(x,y(:,1),'r'); title('Susceptible Red') subplot 322 plot(x,y(:,2),'g') title('Susceptible Green') subplot 323 plot(x,y(:,3),'r'); title('Infected Red') subplot 324 plot(x,y(:,4),'g') title('Infected Green') subplot 325 plot(x,y(:,5),'g') title('Particles')