Question: Curve fitting with perfect data. Curve fitting allows us to summarize the behavior of a system using a model of the behavior. Later in this

 Curve fitting with perfect data. Curve fitting allows us to summarize

Curve fitting with perfect data. Curve fitting allows us to summarize the behavior of a system using a model of the behavior. Later in this course we will fit a curve to the heart rate after exercise to determine the recovery rate. In this example we will consider the growth of bacteria which is modeled as an exponential function A(t)=Pekt where A is the number of bacteria, P is the number of bacteria at time t=0, and k is the constant describing the growth rate. a. Define P=100,k=1, and t as a vector spanning from 0 to 5 hours in 0.1 hour increments. b. Define the time-dependent population of bacteria A according to the equation above. c. Fit a single-term exponential to the data using [cf,gof]=fit(t,A,exp1,startpoint,[1001]); Here 'exp1' specifies a single-term exponential and the name-value pair 'startpoint' specifies the starting guess for P and k. d. Display the goodness of fit information (gof), it should be a perfect fit with R2=1. e. Plot the population data (A) vs time using blue dots ('b.') and the fit (cf) vs time with a red line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!