How can I fit a complex function involving integrals?
2 views (last 30 days)
Show older comments
Hi,
So I have a generated curve with the x axis = time and y axis = Ct(t), and I want to fit this curve based on a different model and then output the fitting parameters.
The function that will be used to fit the curve, which outputs Ct(t) given t, is very complex, as shown by the code below:
func = @(x) (alpha*exp(-beta*x)/(1+exp(-s*(x-tau))) + ...
A1/(sigma1*sqrt(2*pi))*exp(-(x-T1).^2/(2*sigma1.^2)) + ...
A2/(sigma2*sqrt(2*pi))*exp(-(x-T2).^2/(2*sigma2.^2))) ...
.* exp(-Ktrans/ve*(T-x));
Ct(t) = vp * Cp(t) + Ktrans * integral(func, 0, T);
Based on a pre-generated curve, I want to fit that curve using this function above, then output the parameters of fitting (Ktrans, ve, and vp, as all other variables are constant).
How would I go about implementing this fitting procedure in MATLAB?
Thanks so much for the help!
0 Comments
Answers (0)
See Also
Categories
Find more on Interpolation 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!