Find the parameters of integration

2 views (last 30 days)
Kim Jeong Min
Kim Jeong Min on 2 Jul 2018
Commented: Ameer Hamza on 3 Jul 2018
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 Comments
Walter Roberson
Walter Roberson on 2 Jul 2018
It is not necessary -- it just makes it easier, probably.
Kim Jeong Min
Kim Jeong Min on 2 Jul 2018
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".

Sign in to comment.

Answers (1)

Ameer Hamza
Ameer Hamza on 2 Jul 2018
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 Comments
Kim Jeong Min
Kim Jeong Min on 3 Jul 2018
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 on 3 Jul 2018
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!