Question: % Code for Logistic Slope Field with Solutions. r = 0 . 5 ; % growth rate K = 1 0 ; % Carrying capacity

% 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 =________;
% 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!