expfit.m 129 Bytes
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
1
2
3
4
5
6
7
8
function x = expfit(p, data)
  n=data;

% data1, data2 are actually unused

  for i=1:n
    x(i)=p(1)*exp(-p(2)*i) + p(3);
  end