Insert your introduction here.
Your intro should usually be written before lab.
Write a short paragraph about the purpose of the lab, the technique(s) you're using, the samples you're analyzing, and any additional background information you can think of that will help frame the purpose of the lab. At minimum you should include and overview (not detail) of:
Fill in all of the exact details necessary for you to repeat the study without any additional resources.
Much of this section should be filled in during lab!
The following code chunk contains a function to calculate serial dilutions, which was copied directly from the Octave Cookbook in the Lab Manual (Appendix B). Run it as-is and then you can call the function serialDilution()
to do your calculations for you.
In [1]:
###### Use this function to calculate stand concentrations. ############################
## Leave the function alone
function concentrations = serialDilution(stock, pipettes, flasks)
concentrations =[];
for i = 1:length(pipettes)
if i == 1
concentrations(i) = stock * pipettes(i)/flasks(i); # calculate first dilution
else
concentrations(i) = concentrations(i-1) * pipettes(i)/flasks(i); # calculate all other dilutions
end
end
concentrations = flip(concentrations)'; # reverse the vector from lowest to highest and transpose to column vector
end
########################################################################################
Add code cells here to process data. You should intersperse them with headings and text (i.e. Markdown cells) to explain what you're doing as you process the data.
Refer to the example on at alphonse.github.io/archive/chem370-s2020/notebooks for more info.
The following code chunk contains a function to calculate serial dilutions, which was copied directly from the Octave Cookbook in the Lab Manual (Appendix B). Run it as-is and then you can call the function [fit_params, r2, fitline] = fitlm(concentration_vector, standards_vector);
to perform a linear fit (like linest in Excel).
In [118]:
##### Define function to calculate linear fit and R2 ###############################
##### Leave this section alone
function [fit_params, r2, fitline] = fitlm(x, y)
X = [ones(length(x), 1) x];
fit_params = (pinv(X'*X))*X'*y;
# watch this video to understand this code: https://www.youtube.com/watch?v=w2FKXOa0HGA
ss_tot = sum((y - mean(y)).^2);
ss_reg = sum(((X*fit_params) - mean(y)).^2);
r2 = ss_reg/ss_tot;
fitline = [x, X*fit_params];
end
#####################################################################################
Calculate your LOD and LOQ here.
Note that you can add equations with $\LaTeX$ functions, e.g.:
$$ LOD = \frac{3\sigma_{blank}}{m} $$For more on $\LaTeX$ see: https://www.caam.rice.edu/~heinken/latex/symbols.pdf