function retval = logisticfn(m)
%% usage:  y = logisticfn(m)
% description: returns logistic vector function
% given argument m = [K;P0;r]

myP = [
000  5.835;
010  6.013;
020  6.048;
030  6.008;
040  6.013;
050  6.253;
060  6.665;
070  7.124;
080  7.581;
090  8.216;
100  9.168;
111  10.164;
121  12.000;
131  13.896;
141  15.914;
151  17.928;
161  20.066;
171  22.712;
181  25.974;
191  29.003;
201  32.612;
211  36.136;
221  37.932;
231  39.988;
241  41.748;
251  43.815;
261  46.196;
271  49.152;
281  49.634;
291  51.099;
301  52.085];
n = size(myP,1);
retval = zeros(n,1);
for kk = 1:n
  P = myP(kk,:);
  retval(kk) = P(2)-m(2)*m(1)/(m(2)+(m(1)-m(2))*exp(-m(3)*P(1)));
end

