Olfaction code
% fig1share.m is a matlab script for one odor
% its two graphics panels are like Fig 1b and 1e in the paper
% by adjusting strength (below) other parts of Fig 1 can be recovered
% span of binding constants 10^6
strength=.1 % for saturation, set strength=1
% strength=.003 is 3 times threshold
logtarget = 6*rand(N,1)-6; %the target at saturating concentration
target = exp(2.3*logtarget); % the signal due to the target
% when present at saturating strength
logbackground = 6*rand(N,1)-6; % the logbackground at saturating conc.
background = exp(2.3*logbackground); % actual signal from saturating bkgnd.
y=log10(target*strength)+0.1*randn(2000,1); % log10 of signal due to
% target at (strength) + plus noise