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!