Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Equations We can model what happens over time using ordinary differential equations -these are equations that say how a given value (eg, S, l, and

image text in transcribedimage text in transcribedimage text in transcribed

Equations We can model what happens over time using ordinary differential equations -these are equations that say how a given value (eg, S, l, and R) change if you take a small step forward in time. How Changes:-=-- How I changes: How R changes: ~ - Ilbu Total population: N = S + 1 + R4 dt dlaSI dt dR dt o Assume no births or deaths, so N always stays the same. dS Notation note: *, where S is a variable changing with time, denotes the rate of change of that variable at a particular instance in time. So, if -* - -3 att- 0, that means that on day 0, the number of susceptibles is decreasing by 3 people a day.* This concept is particularly difficult, especially if you have little experience in calculus. Ask for help and look at the example in part 1. dt dS dt We can approximate how S, I, and R change by taking a small step h (in days) forward in time. If So is the starting value for S, then after h time S1 is approximately: S1-So +he . Use the same type of calculations for R and i (e.g. R1 = Ro + hat, h = 10 + hdt). After calculating new values for S, I, and R, you can repeat the calculations to find the values at the next time step: S2 -S1 + h-. Remember: To calculate the second step (S2) you need to use the values from the previous step (S, Ri, li). The table below demonstrates the manual calculation for S. dS dt nitial values a = 104 b 1.25+ R 0 (no one's recovered yet) l 100 (100 people have been infected) h0.05 days Instead of just two values of S, do a range of them. Values for all other variables are the same as in part 1. To do:+ 1. Calculate two time steps with h 0.05 days for starting values of S ranging from 0 to 2,000 in steps of 500. a. You must use an array for this 2. Print out ending values for I, R, and S using disp. Implementation notes: + You should be able to take the code for one of your S values from part 1 and simply replace your starting variables with arrays instead of numbers. Make sure all of the arrays (S, I, R, N) are all the same lengthumber of elements. - Use disp to display the answer instead of fprintf. . Self-Check*

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 9th International Conference Dasfaa 2004 Jeju Island Korea March 2004 Proceedings Lncs 2973

Authors: YoonJoon Lee ,Jianzhong Li ,Kyu-Young Whang

2004th Edition

3540210474, 978-3540210474

More Books

Students also viewed these Databases questions

Question

Assess the impact of aging on memory.

Answered: 1 week ago

Question

Persuading Your Audience Strategies for

Answered: 1 week ago