Finding the fitting equation
이전 댓글 표시
I have some experiential data points as the attached file. How can I find a fitting equation for this data following a form below
댓글 수: 2
Image Analyst
2016년 4월 23일
What are the independent variables? T and P? What are the parameters to estimate? The A? What data do you have to train the regression?
Star Strider
2016년 4월 23일
Before I download the file, please supply some details about the model:
- What variables are your data?
- What variables are the parameters you’re estimating?
The format for an objective function to give to the nonlinear solvers is:
fcn = @(prmv, indep_var) ...;
so if you were solving for a straight-line fit ‘y=m*x+b’, the function would be:
fcn = @(prmv,indep_var) prmv(1).*indep_var + prmv(2);
where ‘prmv’ is the parameter vector, and ‘indep_var’ is your independent variable. (You can call them whatever you like. The function just has to conform to this format.)
It would be easier for you to write your objective function as an anonymous function than a function file. If you have two independent variables, put them together in a matrix, and pass the matrix as one argument to your function. You can split them apart inside your function.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Predictive Coding에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!