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!