
Elements Of Electromagnetics
7th Edition
ISBN: 9780190698614
Author: Sadiku, Matthew N. O.
Publisher: Oxford University Press
expand_more
expand_more
format_list_bulleted
Question
6.1
Complete the code please.
![Objectives: Solve a system of ODEs using built-in Matlab functions like ode45(). You must be able to setup the inputs properly by hand or in Matlab.
The Lotka-Volterra predator-prey model uses first-order differential equations to estimate the populations of two interacting species, p₁ and p2-
dpi
dt
dp2
dt
= a*pi-ß* P1 * P2
Script
= 8 * P1 * P2-Y * P2
where a is the prey's growth rate, ß is the prey's death rate, & is the predator's growth rate and y is the predator's death rate.
We want to model the population of snow hares (pi) and Canadian lynxes (p2).
Assume:
▪ the population at t=0 is 100 hares and 5 lynxes
▪ all rates are constant
▪ no other factors influence population size
Your final script should:
1. implement the predator-prey model with a = 0.48, ß= 0.025, y = 0.68 and 8 = 0.02.
2. solve the system of differential equations at all timepoints in tYears = 0:0.25:100 using ode45 and the initial populations provided in po
3. assign the resulting population estimates to a 2-column matrix named ppPop. Prey should be in the first column and predator in the second
Make sure you supply a time vector instead of a time span to the solver ensures the solutions are evaluated at the same time points for the grader tool.
1 pe = [100 5]; % population of snow hares, lynxes at t=0
2 tYears = 0:0.25:100; % discrete time interval, in years
4% Add your code below
6 % Model parameters (can be moved to where needed in your script)
7 a = 0.48; % prey's growth rate
8 b = 0.025; % prey's death rate
9 c = 0.68; % predator's death rate
10 d = 0.02; % predator's growth rate
11](https://content.bartleby.com/qna-images/question/d20dfe5a-a4c1-4793-9f05-a80ad59a67d4/6c688117-da52-4cb8-b053-dd30110d033b/x9ujun4_thumbnail.png)
Transcribed Image Text:Objectives: Solve a system of ODEs using built-in Matlab functions like ode45(). You must be able to setup the inputs properly by hand or in Matlab.
The Lotka-Volterra predator-prey model uses first-order differential equations to estimate the populations of two interacting species, p₁ and p2-
dpi
dt
dp2
dt
= a*pi-ß* P1 * P2
Script
= 8 * P1 * P2-Y * P2
where a is the prey's growth rate, ß is the prey's death rate, & is the predator's growth rate and y is the predator's death rate.
We want to model the population of snow hares (pi) and Canadian lynxes (p2).
Assume:
▪ the population at t=0 is 100 hares and 5 lynxes
▪ all rates are constant
▪ no other factors influence population size
Your final script should:
1. implement the predator-prey model with a = 0.48, ß= 0.025, y = 0.68 and 8 = 0.02.
2. solve the system of differential equations at all timepoints in tYears = 0:0.25:100 using ode45 and the initial populations provided in po
3. assign the resulting population estimates to a 2-column matrix named ppPop. Prey should be in the first column and predator in the second
Make sure you supply a time vector instead of a time span to the solver ensures the solutions are evaluated at the same time points for the grader tool.
1 pe = [100 5]; % population of snow hares, lynxes at t=0
2 tYears = 0:0.25:100; % discrete time interval, in years
4% Add your code below
6 % Model parameters (can be moved to where needed in your script)
7 a = 0.48; % prey's growth rate
8 b = 0.025; % prey's death rate
9 c = 0.68; % predator's death rate
10 d = 0.02; % predator's growth rate
11
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 1 steps

Knowledge Booster
Similar questions
- Note: Round your final answer to 2 decimal places if it is not a whole number. Note:- Do not provide handwritten solution. Maintain accuracy and quality in your answer. Take care of plagiarism. Answer completely. You will get up vote for sure.arrow_forwardAnswer the value of the integration constant C4. Enter your answer in kNm2 to three decimal places.arrow_forward11)arrow_forward
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY

Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press

Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON

Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education

Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY

Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning

Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY