How can I use levenberg-marquardt algorithm with two variables
Show older comments
Hello, everyone.
I started to use lsqcurvefit function in matlab for estimating the parameters in reaction kinetics.
My reaction kinetics are like this => r = k1[a][b] / (1+k2[a]+k3[b])^2
When I tried to use lsqcurvefit function, it demands only one variable x, however in my kinetics there are two variables a and b for output(reaction rate r).
Is there any way that can estimate reaction constant parameters k1,k2,k3 with two reaction variables a and b in kinetics?
I searched in matlab to solve this problem, but I couldn't find it.
I hope I could get good reply at here.
Thanks!
4 Comments
J. Alex Lee
on 29 Mar 2021
what form is the data that you have (you have list of values for r with corresponding [a] and [b])? what does your model residual function look like, and how are you calling it?
based on what i see, you should be able to do it if you have more than 3 triplets of (r,a,b) data
Taeksang Yoon
on 29 Mar 2021
Edited: Taeksang Yoon
on 29 Mar 2021
J. Alex Lee
on 29 Mar 2021
As @Star Strider's answer shows, I guess no, it is not important for you to know what the "residual function" is, because lsqcurvefit will automagically define it for you based on the model function that you give it. But it is definitely necessary for estimation since it is what defines "how far is your model from your data at this current set of estimates".
As for estimation and validation samples, I don't know if that's a typical thing for these types of goals, but if you're not going to use all available data I suppose I'd throw another caution out there to make sure you sample well...depending on how noisy your data is, 8 data points for 3 parameters doesn't seem like a lot, but i guess also depends on how "rigid" the model is...
Taeksang Yoon
on 30 Mar 2021
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!