Using Matlab; Please show written program to execute and instructions to create
ID: 646471 • Letter: U
Question
Using Matlab; Please show written program to execute and instructions to create plot:
Populations tend to expand as P=Poe^rt, where P is the current population, Po is the original population, r is the rate, expressed as a fraction, t is time.
If you originally have 100 rabbits that breed at a rate of 9% per year, find how many rabbits you will have at the end of each year for 30 years. Create a figure window with three subplots. In the first subplot plot t versus P. In the second subplot plot t versus P, scaling the x axis logarithmically. In the third subplot plot t versus P, scaling both axes logarithmically. Add title to each graph.
Explanation / Answer
---------t vs p plot-------------
t=linespace(0,30,1);
p=poe^rate*t;
plot(t,p)
---------t vs p plot scaling t logarithmically-------------
t=linespace(0,30,1);
p=poe^rate*t;
semilogx(t,p);
---------t vs p plot scaling t and p logarithmically-------------
t=linespace(0,30,1);
p=poe^rate*t;
loglog(t,p);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.