Curve fitting multiple parameters function
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a set of data that fits a defined curve fitting function model as
I = a*exp(-bx)+c;
the parameters a, b and c depends on a function r, say (a,b,c) = f(r)
My defined function I also depends on another parameter k , say (a,b,c) = f(k)
How can I define single function that that depends on both k and r, say
I = f(a,b,c)
I = a*exp(-bx)+c
(a,b,c) = f(k,r)
Thank you
2 个评论
Sambit Supriya Dash
2021-8-15
Could you elaborate more the question with funs. or with some similar examples ?
回答(1 个)
Sulaymon Eshkabilov
2021-8-16
You can write a function file or function handle, e.g.:
F=@(k, r, x)(2*r*k*exp(0.576*k*x)+c); % etc.
% OR
function F = MyFun(k,r, x)
F = (2*r*k*exp(0.576*k*x)+c);
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!