Growth data of a sunflower plant is given in the following t

Growth data of a sunflower plant is given in the following table: The data can be modeled with a function in the form H = C/(1 + Ae^-Bt) (logistic equation), where H is the height, C is a maximum value for H, A and B are constants, and t is the number of weeks. By using the method described in Section 8.22, and assuming that C = 254 cm, determine the constants A and B such that the function best fit the data. Use the function to estimate the height in week 6. In one figure, plot the function and the data points.

Solution

Enter the following MATLAB code:

x = [1 3 5 7 9 11 12 13]

H = [22 51 127 202 227 248 252]

y = [10.5454 3.9804 1 0.2574 0.1189 0.0242 0.0079]

C = 254

P = polyfit (x, log(y), 1);

A = exp(P(2))

B = -P(1)

x1 = [1:1:13];

H1 = C./(1+A*exp(-B*x1));

fprintf(\'The height in week 6 = %6.2f\ \', C/(1+A*exp(-B*6)))

plot (x,H,\'o\')

hold on

plot(x1,H1)

title (\'Height vs Number of weeks\')

xlable(\'t (weeks)\');

ylable(\'Height (cm)\');

Output:

A = 21.1829

B = 0.6058

The height in week 6 = 162.92 cm

Enter the following MATLAB code:

x = [1 3 5 7 9 11 12 13]

H = [22 51 127 202 227 248 252]

y = [10.5454 3.9804 1 0.2574 0.1189 0.0242 0.0079]

C = 254

P = polyfit (x, log(y), 1);

A = exp(P(2))

B = -P(1)

x1 = [1:1:13];

H1 = C./(1+A*exp(-B*x1));

fprintf(\'The height in week 6 = %6.2f\ \', C/(1+A*exp(-B*6)))

plot (x,H,\'o\')

hold on

plot(x1,H1)

title (\'Height vs Number of weeks\')

xlable(\'t (weeks)\');

ylable(\'Height (cm)\');

Output:

A = 21.1829

B = 0.6058

The height in week 6 = 162.92 cm

 Growth data of a sunflower plant is given in the following table: The data can be modeled with a function in the form H = C/(1 + Ae^-Bt) (logistic equation), w
 Growth data of a sunflower plant is given in the following table: The data can be modeled with a function in the form H = C/(1 + Ae^-Bt) (logistic equation), w

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site