Beer's law while loop
Ältere Kommentare anzeigen
L=1; %cm
e=117000; %extinction coefficient
m=1; %mass of dye to be used in mg
w=407.99; % molar weight of dye in mg/mmol
v=100; %volume of ccl4 in ml
c=m/(v*w); %molarity mmol/ml
t=logspace(1,10000,10000);
i=0;
A=0;
while A<1
A=e*L*d;
i=i+1;
d=c./t(i);
end
if A>1
disp('too concentrated')
else ('ok to use')
end
here's my code for beer's law equation. Beer's law is A=elc. e and l does not change. concentration(c) can change but since 1mg is almost impossible to measure with scale, I'm going to use serial dilution. I used the while loop for serial dilution of 10 to get the how many dilution I need to perform in order to get A<1. But somehow it says everything is 0.
Thank you for reading my question
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Assembly finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!