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 non-disclosure agreements, we will call "Chemical X") deters the growth of certain bacterial
colonies. They have varied the concentration of Chemical x and measured how long it takes for an inital sample of 10 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 o.
% Input data
concentration =[0:.1:2.5];% concentration of chemical in M/L
% 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
c_quad =...,% find the coefficients
quad_fit =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
c_cube =dots,% find the coefficients
cube_fit =dots,% calculate values for the fit
% Plot both fits and the original data on the same axes
plot(concentration, time,'*', concentration, quad_fit, '-', concentration, cube_fit, 'k--');
legend('Data', 'Quadratic fit', 'Cubic fit');
title('Effectiveness of Chemical x in Preventing Bacterial Growth');
xlabel('Concentraton (M/L)');
ylabel('Time to fill dish (days)');
 Fitting Data: Bacteria Scientists have been investigating whether a new chemical

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!