Predicting the Population
You can share your live script with other MATLAB users so that they can reproduce your results. You
also can publish your results as PDF, Microsoft® Word, or HTML documents. Add controls to your
live scripts to show users how important parameters affect the analysis. To add controls, go to the
Live Editor tab, click the Control button, and select from the available options.
We can now calculate the predicted population of a given year using our three equations.
year =
;
xyear = (year-1900)/50;
pred1 = polyval(coef1,xyear);
pred2 = polyval(coef2,xyear);
pred3 = polyval(coef3,xyear);
[pred1 pred2 pred3]
ans = 1×3
299.7517 321.6427 295.0462
Introduction to the Live Editor
19-63
Précédent

- 681/1450

Suivant