function y = boltzmannModel(p, x) % computes the Boltmannfunction given the parameters given in p % the following order is assumed % p(1) = minimum y-value % p(2) = maximum y-value, i.e. the saturation % p(3) = the position of the inflection point % p(4) = the slope at the inflection y = ((p(1) - p(2))) ./ (1 + exp((x-p(3))/p(4))) + p(2); end