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!