Question

Q3b In the Q3b.m file, plot the PFA against the year as blue circles in a new figure. You believe that the data can be appropriately represented by either an exponential model or a 2d order polynomial model. Find the coefficients for each model based on the form of the equations below: Exponential model: PFA- aeBt 2 order polynomial model: PFA at2 + bt + c where a. B, o, b, c are coefficients, and t represents the year Plot both fitted models for years 1950 to 2100 (yearly increments) on the newly created figure. Print the equations of the fitted models to the command window using the exponential specifier for fprintf *You should have six figure windows by the end of this task

Year ForestArea TotalLandArea PEA 1950 119365 1066012 11.197341 1985 72764 1067328 6.817398 2000 64610 1066839 6.056209 2005 56387 1065192 5.293600 2010 46135 1066176 4.327147 2020 36679 1065497 3.442431

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code:


t = [1950 1985 2000 2005 2010 2020];
tq = 1950:2100;
PFA = [11.197341 6.817398 6.056209 5.293600 4.327147 3.442431];
ypi = interp1(t,PFA,tq,'linear','extrap');
p = polyfit(tq, ypi, 2);
yp = polyval(p,tq);
subplot(2,1,1);
plot(tq,ypi);
title('polynomial fit');
fprintf('2 order polynomial = %e*t^2 + %e*t + %e ',p(1),p(2),p(3));


lPFA = log(ypi);
pe = polyfit(tq, lPFA, 1);
ype = polyval(pe,tq);
subplot(2,1,2);
plot(tq,ype);
title('exponential fit');
alpha = exp(pe(2))
beta = pe(1)
fprintf(' exponential = %e*e^(%e*t) ',alpha,beta);

Output:

2 order polynomial = 1.196477e-04*t2 + -5.814324e-01*t + 6.898487e+02 Warning: Imaginary parts of complex X and/or Y arguments ignored > In scrap (line 18) alpha = 9.0668e+15 3.6528e+15i -0.0176690.025065i exponential-9.066821e+15*e (-1.766864e-02*t) fy >>polynomial fit 10 -5 1950 2000 2050 2100 exponential fit 2 1950 2000 2050 2100

Add a comment
Know the answer?
Add Answer to:
Q3b In the Q3b.m file, plot the PFA against the year as blue circles in a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 4 MARKS QUEStION 3 Background You are part of a team working for the United Nations...

    4 MARKS QUEStION 3 Background You are part of a team working for the United Nations Environment Programme (UNEP) to investigate the deforestation process in Borneo. You are provided six images of the forest area in Borneo from 1950-2020 which comprise of historical and projection data. Forests are represented as green pixels and deforested areas as yellow pixels. Q3a In the Q3a.m file, use the imread() function to read the images. For each year (1950, 1985, 2000, 2005, 2010, 2020),...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT