how to fit the data

3 views (last 30 days)
Elysi Cochin
Elysi Cochin on 5 Jul 2014
Edited: Star Strider on 7 Jul 2014
I havent used curve fitting in matlab, Please someone do help me solve this out....
46 3.26 450 937 3050 0.51 37 32 135
35 3.48 450 438 1525 0.55 37 28 86
35 3.93 450 194 762 0.66 37 28 54.5
36 3.56 450 857 3050 2.23 37 28 232
35 3.77 450 405 1525 2.36 37 28 138
35 4.05 450 188 762 2.54 37 28 74
The above is few rows of my data. The columns 'A' to 'H' are the input variables and the column 'I' is the output. Using this data, I need to find out an equation that fits the given input and output, using curve fitting in matlab. It has to be done as a recursive procedure and is to be terminated when the 'residual' ie, the difference between the available result and the one found using the equation obtained from curve fitting is a minimum.
i used curve fitting as follows if not this way... please do reply what are the other possible way of doing it...
  2 Comments
Star Strider
Star Strider on 5 Jul 2014
You need a mathematical model of your process to fit your data. What model you choose (linear or nonlinear) depends on the process itself, what information you want to get from it or about it, and what your hypotheses are about your process and your data. We can help you develop your model and do the regression, but we cannot do it for you, especially with so little information.
Elysi Cochin
Elysi Cochin on 7 Jul 2014
sir i have used this... please can you tell me what are the other information needed so that you can help me in doing this?

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 7 Jul 2014
Edited: Star Strider on 7 Jul 2014
It depends on the model that you want to fit to your data. To do a linear regression, assuming some constant vector B multiplied by the first 8 columns of your data equals the 9th column, this would be appropriate:
AI = [46 3.26 450 937 3050 0.51 37 32 135
35 3.48 450 438 1525 0.55 37 28 86
35 3.93 450 194 762 0.66 37 28 54.5
36 3.56 450 857 3050 2.23 37 28 232
35 3.77 450 405 1525 2.36 37 28 138
35 4.05 450 188 762 2.54 37 28 74];
AH = AI(:,1:8);
I = AI(:,9);
B = AH\I % Assume linear regression with AH*B = I
producing:
B =
2.1354e+000
-33.3235e+000
37.5429e-003
-1.4341e+000
481.3711e-003
7.9226e+000
0.0000e+000
0.0000e+000

More Answers (0)

Community Treasure Hunt

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

Start Hunting!