Find the parameters of integration

1 次查看(过去 30 天)
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 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by