function conc=volts2conc(volts, temperature,instrument)

% conc=volts2conc(volts, temperature,instrument)
%
% instrument | Fluorometer | Coefficient | Exponent
% 1          | 162         | 0.01        | 1.05
% 2          | 184         | 0.0068      | 1.25

if nargin<3
  instrument=1;
end

if instrument==1;
  C=0.01;
  E=1.05;
elseif instrument==2
  C=0.0068;
  E=1.25;
else
  error('No calibration for that instrument')
end

conc=0.01*(10.^volts-10^1.05)./1.027.^(temperature-9);

disp([num2str(sum(conc<0)) ' of ' num2str(length(volts)) ...
      ' concentration values are < 0, setting them equal to 0']);
conc(find(conc<0))=0;
