Find the parameters of integration

조회 수: 3 (최근 30일)
Kim Jeong Min
Kim Jeong Min 2018년 7월 2일
댓글: Ameer Hamza 2018년 7월 3일
Hello everyone, I have a question that hasn't been able to find it on my own though, so any help is greatly appreciated.
I try to find the parameters a, b, c, d and e which satisfy below equations.
Where T_1~T_5 and q_1~q_5 are input parameters which already know.
Are there any functions that can solve these kinds of problem in MATLAB?
Thanks for any helpful ideas.
  댓글 수: 6
Walter Roberson
Walter Roberson 2018년 7월 2일
It is not necessary -- it just makes it easier, probably.
Kim Jeong Min
Kim Jeong Min 2018년 7월 2일
If the problem is very easy to solve using "Curve Fitting Toolbox" (or the problem is too complicated without "Curve Fitting Toolbox"). Please tell me the solution with "Curve Fitting Toolbox".

댓글을 달려면 로그인하십시오.

답변 (1개)

Ameer Hamza
Ameer Hamza 2018년 7월 2일
Try this. This requires optimization toolbox. This uses the sum of squared error from your equations as an objective function.
T0 = 1;
Tx = [2; 3; 4; 5; 6]; % from T1 to T5
qx = [2; 3; 4; 5; 6];
f = @(a,b,c,d,e, T) (a+b*T+c*T.^2).^(1./(d+e*T));
f_int = @(a,b,c,d,e, T0, T1) integral(@(T) f(a,b,c,d,e,T), T0, T1);
obj_fun = @(a,b,c,d,e) sum((arrayfun(@(T0, T1) f_int(a,b,c,d,e, T0, T1), T0*ones(size(Tx)), Tx)-qx).^2);
sol = fmincon(@(x) obj_fun(x(1),x(2),x(3),x(4),x(5)), [1;1;1;1;1], [], []);
The sol contain value of a, b, c, d and e in order.
  댓글 수: 7
Kim Jeong Min
Kim Jeong Min 2018년 7월 3일
Thank you for using so much personal time to solve this problem.
The conditions are:
Sorry for the mistake I made (missing exponential) for the specific form of function.
Ameer Hamza
Ameer Hamza 2018년 7월 3일
As Walter pointed out, the difficulty is finding a suitable starting point for optimization. After the introduction of exp() term, it is even more difficult. The new integrand is very sensitive to the value of b and c, for the given value of integral limits. I don't have curve fitting toolbox but maybe it is able to estimate parameters for this new integrand.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile 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!

Translated by