Question: Fitting Data: Bacteria Scientists have been investigating whether a new chemical ( which due to non - disclosure agreements, we will call Chemical X
Fitting Data: Bacteria
Scientists have been investigating whether a new chemical which due to nondisclosure agreements, we will call "Chemical X deters the growth of certain bacterial
colonies. They have varied the concentration of Chemical and measured how long it takes for an inital sample of cells to grow to fill the Petri dish.
The scientists are not sure from a quick look at the data whether a quadratic or cubic fit wil be better for this data, so you are to complete the MATLAB code below to
perform both data fits. Then the program will plot the data for you. The data are provided in two vectors in the code.
Script
Input data
concentration ::; concentration of chemical in ML
time until Petri dish is filled
Perform a quadratic fit of the data
Complete the two lines below, replacing with the appropriate code for a quadratic fit
cquad find the coefficients
quadfit dots calculate values for the fit
Perform a cubic fit of the data
Complete the two lines below, replacing with the appropriate code for a cubic fit
ccube dots, find the coefficients
cubefit dots, calculate values for the fit
Plot both fits and the original data on the same axes
plotconcentration time, concentration, quadfit, concentration, cubefit, k;
legendData 'Quadratic fit', 'Cubic fit';
titleEffectiveness of Chemical in Preventing Bacterial Growth';
xlabelConcentraton ML;
ylabelTime to fill dish days;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
