% PLOT_SID.m % % analyze and plot the model results LW=2;FS=16;FW='demi'; % Figure 1: 3 subplots S,I, D figure subplot(2,2,1) plot(t,S,'b-','LineWidth',LW) title('Susceptible','FontSize',FS,'FontWeight',FW) xlabel('Time (days)','FontSize',FS,'FontWeight',FW) ylabel('Individuals m^{-2}','FontSize',FS,'FontWeight',FW) set(gca,'LineWidth',LW,'FontSize',FS,'FontWeight',FW) subplot(2,2,2) plot(t,I,'g-','LineWidth',LW) title('Infected','FontSize',FS,'FontWeight',FW) xlabel('Time (days)','FontSize',FS,'FontWeight',FW) ylabel('Individuals m^{-2}','FontSize',FS,'FontWeight',FW) set(gca,'LineWidth',LW,'FontSize',FS,'FontWeight',FW) subplot(2,2,3) plot(t,D,'k-','LineWidth',LW) title('Dead','FontSize',FS,'FontWeight',FW) xlabel('Time (days)','FontSize',FS,'FontWeight',FW) ylabel('Individuals m^{-2}','FontSize',FS,'FontWeight',FW) set(gca,'LineWidth',LW,'FontSize',FS,'FontWeight',FW) %xlim([0 100]) % print and sent plot to a folder %print('-dpng',['/Users/gorka/Documents/1-EHU/Master Projects/OSASUNA/matlab code/' PAR.case 'Num.png']) % Figure 2: Infection rate by contact figure N=2199711; infI=PAR.Dinfect .* D .* S; plot(t,infI,'r-','LineWidth',LW) title('Infection rate','FontSize',FS,'FontWeight',FW) xlabel('Time (days)','FontSize',FS,'FontWeight',FW) ylabel('Infection rate (individuals m^{-2} day^{-1}','FontSize',FS,'FontWeight',FW) set(gca,'LineWidth',LW,'FontSize',FS,'FontWeight',FW) % print('-dpng',['Figures/Ab' PAR.case 'InfRate.png']) % Figure 3 for Susceptible, Infected, Dead together figure plot(t,S,'b-',t,I,'r-',t,D,'k-','LineWidth',LW) %title(' Susceptible, Infected, Dead','FontSize',FS,'FontWeight',FW) legend({'Susceptible','Infected','Dead'},'Location','northeast','FontSize',16) xlabel('Time (days)','FontSize',FS,'FontWeight',FW) ylabel('Individuals m^{-2}','FontSize',FS,'FontWeight',FW) set(gca,'LineWidth',LW,'FontSize',FS,'FontWeight',FW) % print('-dpng',['Figures/Ab' PAR.case 'InfRate.png']) %xlim([0 100]) %%% COMENT UNCOMMENT % % import excel real cases % % % Figure 5: for Real Cases of basque country and model predictions % % figure % % %d=[0.0;2.0;9.0;14.0;19.0;20.0;21.0;22.0;24.0;26.0;27.0;28.0;32.0;51.0;62.0;62.5;63.0;63.0;63.5;64.0;64.5;65.0;65.0;68.0;71.5;80.0;82.5;83;83.5;84.0;84.5;85.0;85.5;86.0;87.0]'; % % z=(0:1:350); % %z=(0:1:100); % %plot(z,Cases,'r-','LineWidth',2) % plot(z,Cases,'w--s','LineWidth',1,'MarkerEdgeColor','k','MarkerFaceColor','r','MarkerSize',3); % % % hold on % % N=2199711; % tspan=[0 350]; % % %tspan=[0 100]; % [t,y]=ode45(@RHS_SID,tspan,y0); % %fitted nodel % % %Iday=(PAR.Iinfect.*S.*I)/N; % Iday=(PAR.Iinfect.*S.*I); % plot(t,Iday,'r-','LineWidth',3) % orange color % %title('Model Fit','FontSize',20) % % % xlabel('Time (days)','FontSize',15) % % ylabel('Mortality (%)','FontSize',15) % % % % set(gca,'FontSize',16,'LineWidth',1) % h=legend(' Real cases',' Simulation 1'); % set(h,'Location','NorthWest','box','off','FontSize',11); % % Hx=xlabel('Time (days)'); % set(Hx,'FontSize',16) % Hy=ylabel('Cases'); % set(Hy,'FontSize',16) % %ylim([-2 1800]) % xlim([0 350]) % % print('-dpdf','Model_validation_cases.pdf') % %