How to estimate model fitting parameters in matlab

I have 7 simultaneous equations in seven variables (m1,m2,....m7). Four of these equations are simple linear equations (representing mass balance, in forms : m1+m2+m3=0.5 ) and three of these seven equations are non-linear equations (representing reaction constant equations, in form: p1*constant*m1*m2-(m3*m4/m5)=0)..Now, my target is to estimate values of p1,p2,p3 such that the the results from seven simultaneous equations fit my experimental data vector (y=[y1,y2,y3,y4,y5,y6,y7]). To make this happen. I would like to put individual bounds on values of m1,m2,m3,m4,m5,m6,m7 such that their difference from corresponding each value of vector y would not vary more than 10%. Could anybody please help me out that how I can solve this problem?
Currently, I have a code by which I can estimate the parameters (p1,p2,p3) but the values of m vector do not come out to be with maximum error of 10% to experimental data vector y. I am using least squares method.Is there any other method more suitable to deal with such problems?

Answers (1)

If you have the optimization toolbox, use fmincon and additionally to the seven simultaneous equations add the constraints
-0.1 <= (mi-yi)/yi <= 0.1 (i=1,...,7)
(maybe at the beginning without objective function to see whether there is a feasible point at all).
Best wishes
Torsten.

1 Comment

Thanks for answering Torsten but I didn`t get what you mean. I am attaching here the three files I am using in conjugation to solve my problem. The values of ti (i=1,2...7) I am getting are not within maximum of 5-10% from yi (i=1,2...7) and I need to find model fitting parameters (x1,x2,x3)as well. Please help me how I can add bounds to t values in my existing code, while also getting the corresponding values of parameters. Estimate_1 is the script file which runs the code to give the answers

Sign in to comment.

Asked:

on 15 Dec 2015

Commented:

on 15 Dec 2015

Community Treasure Hunt

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

Start Hunting!