Message Boards Message Boards

How to solve a vector field ODE?

Posted 1 year ago

Hi, I am trying to set up a code to plot a streamplot from the results from a SIR model.

The problem to solve is r′=F(r)

where r=(x,y) and F(x,y)=(−bxy/n,bxy/n−k*y)

and where b=3.3925; k=2.95; n=157759;

How can I set up this StreamPlot of the solutions for this SIR problem?

Thanks

POSTED BY: Ser Man
Posted 1 year ago

I'm not sure I fully understand, but would this be along the lines of what you're looking for, except for the simplified parameter values and some arbitrary choice of range?

StreamPlot[{-b x y/n, b x y/n - k y} /. {b -> 3.4, k -> 3, n -> 160}, {x, -100, 100}, {y, -100, 100}]

POSTED BY: Peter Fleck
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract