Polynomial Regression

regress(vx, vy, n) or regress(Mx, vy, n) Returns a vector which interp uses to find the nth order polynomial that best fits the x and y data values in vx and vy in the least-squares sense. Can also be used for multivariate regression, where a matrix Mx of k independent variables and a vector of dependent values, vy, are used to fit an nth order polynomial surface in k dimensions.

interp(vs, vx, vy, x) or interp(vs, Mx, vy, X) Returns an interpolated y-value corresponding to x using the output vector vs from regress. If regress has been used to fit a multidimensional surface, X is a vector of independent variables at which to calculate the interpolated y-value.

Arguments:

Notes:

QuickSheet

Related Topics