Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the code below so that creates Figure 1 exactly as it appears. Note that in this case K = 1 0 and r =

Modify the code below so that creates Figure 1 exactly as it appears.
Note that in this case K=10 and r=0.5.
The solution to the logistic equation P'=rP(1-PK) can be written as
P(t)=KP0ertK+P0(ert-1)
State (e.g., type) the Logistic differential equation describing the dynamics of a Population (P) that
varies in time (t) with a growth rate (r) and carrying capacity (K). State its classification.
The parts in the code that need to be changed are highlighted in yellow. Perform the following task and report them in accordance to the What to Submit section:
1. Modify the code below so that creates Figure 1 exactly as it appears.
2. Note that in this case K=10 and r=0.5.
3. The solution to the logistic equation P= rP (1-P/K)
4. State (e.g., type) the Logistic differential equation describing the dynamics of a Population (P) that
varies in time (t) with a growth rate (r) and carrying capacity (K). State its classification.
5. The parts in the code that need to be changed are highlighted
% Code for Logistic Slope Field with Solutions.
r=0.5; %growth rate
K=10; %Carrying capacity
t=0:0.2:20; % vector for time
% Define the values of x and y that we will use to create the slope field
% We use tS and pS to identify the values of time and population
% to be used for slope field.
[tS, pS]= meshgrid(_____);
% Define the values of the slope (p')
s = r*P*(1-P/K);
% The following line is needed to find the size of each vector (1,s) so
% that we can scale all of the arrows to have the same magnitude=1
L = sqrt(1+ s.^2);
figure(2)
hold on %this command tell MATLAB to draw everything on the current figure
quiver(tS,pS,1./L,s./L,0.5), axis tight
xlabel('time');
ylabel('population');
title('Direction field for dp/dt = r*p*(1-p/K)');
% The nex part adds the solution curves to the slope field
% there are 3 meaningful cases which we will draw in red, green, magenta
p0=________;
p=________;
plot(t,p,'g')
p0=K;
p=________;
plot(t,p,'r')
p0=5;
p=________;
plot(t,p,'m')
hold off %this command tell MATLAB to stop drawing on figure
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions

Question

Write Hund's rule?

Answered: 1 week ago