How to merge two similar functions into a same function? any mathematical modeling method or tool box?
1 次查看(过去 30 天)
显示 更早的评论
I had fitting curves from two sets of data with similar functions. I am wondering if there's any tool box or mathematical modeling method using Matlab to merge these two functions into one function. The two functions are as below:
f(x) = a*exp(b*x) + c*exp(d*x)
a = 105 (104.9, 105)
b = 0.002164 (0.002143, 0.002186)
c = 0.3552 (0.2752, 0.4352)
d = 0.02433 (0.02294, 0.02573)
g(x) = a*exp(b*x) + c*exp(d*x)
a = 112.7 (112.5, 112.9)
b = 0.002181 (0.002137, 0.002226)
c = 0.359 (0.1781, 0.5398)
d = 0.02852 (0.02452, 0.03253)
Thank you!
2 个评论
回答(1 个)
Richard Willey
2012-4-3
Hi Qian
Implicitly, you seem to be suggesting that there is a single model that describes both of these sets of data. Rather than trying to combine the two functions after the fact, why not just fit a single curve to the combined data set? (Add in a dummy variable that codes whether the data is from set one or set two)
If you don't have the raw data available, I'd recommend generating 1000 data points consistent with the first curve, a thousand points that are consistent with the second curve, and fitting a regression to this new data set.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!