Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi Please help my question. Thank you very much. (Need to use matlab) Determine what starting population is needed to start an epidemic. What you
Hi Please help my question.
Thank you very much.
(Need to use matlab)
Determine what starting population is needed to start an epidemic. What you need: A function that is positive when the starting population is big enough, negative when it isn't. If you look at the infected plots, the starting slope of the red line (no epidemic) is negative, while all of the others are positive. functi on [fzer o Val ue] = FindEpidermic(SStart, I Start, a b) The slope at the start can be found by taking one time step (f(x + h) - f(x))/h. Use DiseaseStep (or DiseaseSimulate) to calculate f(x) and f(x + h) for the infected value after one time step. To do: Write the FindEpidemic function above. Use FindEpidemic and fzero to find the zero location. Plot the function (leftmost window in self-check) to check it Print out the actual starting non-infected population value. Implementation fzero takes one parameter. Use an anonymous function to bind IStart, a, and b and let s vary. Use your guess from problem 5 as the starting value for fzero. See how the number of susceptible people needed changes as you vary a and b: Initial infected population (20-200), a (2 - 10), and b (0.5 - 2). Use 10 as your starting value for fzero;its a bit finicky and you may get NaN answers otherwise. Determine what starting population is needed to start an epidemic. What you need: A function that is positive when the starting population is big enough, negative when it isn't. If you look at the infected plots, the starting slope of the red line (no epidemic) is negative, while all of the others are positive. functi on [fzer o Val ue] = FindEpidermic(SStart, I Start, a b) The slope at the start can be found by taking one time step (f(x + h) - f(x))/h. Use DiseaseStep (or DiseaseSimulate) to calculate f(x) and f(x + h) for the infected value after one time step. To do: Write the FindEpidemic function above. Use FindEpidemic and fzero to find the zero location. Plot the function (leftmost window in self-check) to check it Print out the actual starting non-infected population value. Implementation fzero takes one parameter. Use an anonymous function to bind IStart, a, and b and let s vary. Use your guess from problem 5 as the starting value for fzero. See how the number of susceptible people needed changes as you vary a and b: Initial infected population (20-200), a (2 - 10), and b (0.5 - 2). Use 10 as your starting value for fzero;its a bit finicky and you may get NaN answers otherwise
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started