Plant growth
The growth rate of a tree is predicted by $G = \ln(\frac{a}{m^2} + \frac{b}{m} + c)$ where $m$ is the age of the tree, $G$ is the growth, and $a$, $b$ and $c$ are
constants. A scientist performed an experiment and measured the following data points: $m_{exp} = \{2, 5, 10, 15, 20, 25, 30, 35, 40\}$ months
and $G_{exp} = \{5.7, 41., 3.3, 2.5, 2.1, 2.2, 1.7, 1.6, 1.3\}$ centimeters. Write a function called PlantGrowth to calculate the coefficients $a$, $b$ and
c by using regression given experimental datasets $m_{exp}$ and $G_{exp}$, and estimate the growth of the plant at a given month.
Restrictions: The function PlantGrowth must use polyfit.
Hint: The dataset should be linearized before performing a polynomial fit.
Ex:
m = [2 5 10 15 20 25 30 35 40];
G = [5.7 4.1 3.3 2.5 2.1 2.2 1.7 1.6 1.3];
[growth] = FitPlant(m, G, 50)
produces
growth =
1.3712
Function
function [growth] = FitPlant(m, G, month)
% Your code goes here
end