I was trying to do a non-linear curve fitting rouine (to get the parameters of a function using a given set of data) with Octave but didn't know how to use leasqr. If I defined a function f(x) = b*exp(-a*x), and had a set of data like
1 5.9 3 4.5 8 3.2 13 1.9
Can anybody tell me how to fit the function to the data to get the parameters a and b?