Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started