Regression analysis/Data fitting
3 views (last 30 days)
Show older comments
I have an emperical formula RR = P^x Z^y (a + b *V + c *V^2 ). x,y are regression exponents a,b,c are regression constants P,Z,V are variables such that RR=f(P,Z,V)
I have data that relates RR and P,Z,V. Is it possible to fit this data to this particular formulae using matlab 2011? if so are there any similar tuitorial or helpful videos?
Thank you in advance.
0 Comments
Accepted Answer
Matt J
on 10 May 2013
FMINSPLEAS from the File Exchange would be worth a try
It will let you take advantage of the fact that the equation has a linear dependence on some of your parameters (a,b,c) and nonlinear dependence on other parameters (x,y) to do a more efficient fit.
3 Comments
Matt J
on 10 May 2013
Edited: Matt J
on 10 May 2013
funlist specifies the nonlinear parts of the terms in the model equation, or if there is a purely linear term, you put funlist{i}=1. So, the above example corresponds to a model equation,
y=A+ B*sin(c(1)*x) + C*cos(c(2)*x)
where the unknowns are A,B,C, c(1) and c(2). The coefficients A,B,C are what the fminspleas documentation calls Intrinsically Linear Parameters (ILP) because the model equation depends on those linearly. Conversely, lower case c is an Intrinsically Non-Linear Parameter (INLP) vector. fminspleas returns these as 2 separate output argument vectors. So, if the fit succeeds, then this
[INLP,ILP] = fminspleas(funlist,[3 4],x,y)
will give you INLP=[2,3] and ILP=[4,-3,2].
More Answers (1)
Matt J
on 8 May 2013
Edited: Matt J
on 8 May 2013
Your equations are linear in the unknowns a,b,c. Use any MATLAB linear equation solver to find them, e.g.,
7 Comments
Tom Lane
on 10 May 2013
Actually I didn't realize x and y were to be estimated either, but I'm glad you found some approximation that would allow you to proceed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!