Curve fitting multiple parameters function
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Sambit Supriya Dash
am 15 Aug. 2021
Could you elaborate more the question with funs. or with some similar examples ?
Antworten (1)
Sulaymon Eshkabilov
am 16 Aug. 2021
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
2 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!