Plot Population growth function with different values of b using for loop
6 views (last 30 days)
Show older comments
Saira on 1 Feb 2023
Commented: Saira on 2 Feb 2023
I need to plot population growth model with different values of b
using for loops. Both results should be visible on the same graph with different colors.
Here is my function and intial value, but I am not getting how to get the plot .
b= 0.1 0.001
I need two line for each b on the same plot.
Torsten on 2 Feb 2023
f = @(t,b,d,N0) N0*exp((b-d)*t);
t = 0:0.1:10;
N0 = 400;
b = [0.1 0.001].';
d = 0.001;
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!