_:n925d078573d042319856b1c7ab13a9b2xb2
<http://schema.org/text>
"hello \r\ntry this \r\nnow beta and zeta must be vectors so that R_0 is a matrix (2D array)\r\nuse contourf for the plot \r\nI let you choose which colormap fits best your color taste ! \r\nhope it helps \r\n\r\n%Basic Reproduction Number\r\ntheta = 141302; %recruitment rate\r\nmu = 0.001229; %natural death rate\r\ntau = 0.45; %modification factor for A\r\n% zeta = 1/14; %influx from Q to S \r\nzeta = linspace(0,1,100);\r\n% beta = 0.88; %transmission coefficient\r\nbeta = linspace(-0.001,1,100)&#39;; % NB the min value must be slightly negative to let the contour line &quot;0&quot; show up\r\nalpha = 0.75214; %hospitalization rate\r\nq = 0.31167; %influx from Q to I\r\neta_1 = 0.81692; %influx from E to Q\r\neta_2 = 0.02557; %influx from E to A\r\neta_3 = 1/7; %influx from E to I\r\ndelta_1 = 0.16673; %disease death rate for A\r\ndelta_2 = 0.00147; %disease death rate for I\r\ndelta_3 = 0.00038; %disease death rate for J\r\ngamma_1 = 0.00827; %recovery rate for A\r\ngamma_2 = 0.00787; %recovery rate for I\r\ngamma_3 = 0.20186; %recovery rate for J\r\nK_1 = eta_1 + eta_2 + eta_3 + mu;\r\nK_2 = zeta + q + mu;\r\nK_3 = gamma_1 + delta_1 + mu;\r\nK_4 = alpha + gamma_2 + delta_2 + mu;\r\nR_0 = beta.*(tau.*eta_2*K_2.*K_4 + K_3.*(eta_3.*K_2 + eta_1.*q))./(K_1.*K_2.*K_3.*K_4);\r\n\r\n% plot\r\nlevels = (0:0.2:1.2);\r\n[c,h] = contourf(beta,zeta,R_0&#39;,levels);\r\nclabel(c,h)\r\nh.LineWidth = 2; % contour line width (up to you)\r\nxlabel(&#39;eta&#39;);\r\nylabel(&#39;zeta&#39;);\r\ncolormap(jet(numel(levels)-1));\r\ncolorbar(&#39;vert&#39;);\r\n"
<https://se.mathworks.com/matlabcentral/answers/1881467-plotting-contour-plots-of-r0-against-two-parameters?s_tid=prof_contriblnk>