Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a noisy data set (the grey line in the graph below) that corresponds roughly to $y=m(1-2^{-x/k})$ where m and k are unknown constants.

How can I determine the best-fit value of m and k?

enter image description here

I can get an approximate value for k by guessing m and then doing linear regression on $-\log_2(1-y/m)$... by this I estimate m=0.96 and k=1000 (see red and blue dotted lines above), but is there a more systematic way?

Thanks in advance.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Why not do nonlinear least-squares via Levenberg-Marquardt instead of futzing with linearizations? There is the lsqnonlin() function available in MATLAB via the Optimization Toolbox. You will need to figure out good starting values for $m$ and $k$, though that LM can polish to a (hopefully) adequate answer.

share|improve this answer
    
Thanks for this, I hadn't come across lsqnonlin() before... I'll see if I can make it work. –  Richard Inglis Sep 3 '11 at 15:05
add comment

I made this tutorial article about linear and nonlinear least-squares methods.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.