% Load the data file, phenylurea_data.mat
% The MATLAB data is for four phenylurea herbicides:  chlortoluron (c), diuron (d), fenuron (f) and monuron (m).
% For each molecule, the percent of the initial concentration (y) is given as a function of time (x) in minutes under four different catalytic conditions.
% (nocat) No catalyst is used
% (tio2) Small TiO2 particles are added; TiO2 is a common semiconductor used as a photocatalyst
% (tio2plus) Small TiO2 particles are added as well as Na2S2O8, an electron acceptor, to enhance the rate of reaction
% (zno) ZnO particles are added to the reaction.
% Following the example below for diuron, load and plot the data for chlortoluron, fenuron and monuron.
% Comment on any similarities and differences you notice in this data.
%

hold on
plot(d_nocat_x,d_nocat_y)
plot(d_tio2_x,d_tio2_y)
plot(d_tio2plus_x,d_tio2plus_y)
plot(d_zno_x,d_zno_y)
xlabel("Time (min)")
ylabel("Percent Remaining")
title("Diuron")
legend("No catalyst", "TiO2", "TiO2 with Na2S2O8", "ZnO","Location","east")
hold off

%
% Next, consider the degradation rate data for the TiO2 catalyst only.
% Make a plot of percent remaining vs. time containing all four of the phenylurea molecules with the TiO2 catalyst.
% Is this data linear? What does this imply about the order of the reaction?
%
% Find the effective rate constant for the linearized data using the "fit" function for each herbicide.
% Comment on your results
%
% Next replot the data changing the scaling of the y axis to see if the data follows 1st or 2nd order kinetics.
% Find the effective rate constant for the linearized data using the "fit" function
%
% Repeat your analysis for the other catalysis conditions