Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Polynomials and Curve Fitting in MATLAB

MATLAB provides a number of functions for the manipulation of Polynomials. Polynomials are defined in Matlab as row vectors made up of the coefficients of the polynomial, whose dimension is n+1, n being the degree of the polynomial. Polynomials in MATLAB vector must include all polynomial coefficients, even those that are zero.

MATLAB provides the function polyval to evaluate polynomials. MATLAB does not provide a direct function for adding or subtracting polynomials unless they are of the same order, when they are of the same order, normal matrix addition and subtraction applies. Polynomial multiplication is supported by the conv function. Where we want to divide one polynomial by another, in MATLAB we use the deconv function.

Polynomials and Curve Fitting in MATLAB from Shameer Ahmed Koya

Curve fitting is the process of adjusting a mathematical function so that it lays as closely as possible to a set of data points. MATLAB provides a number of ways to fit a curve to a set of measured data. One of these methods uses the “least squares” curve fit. This technique minimizes the squared errors between the curve and the set of measured data. The function polyfit solves the least squares polynomial curve fitting problem.


This post first appeared on Electrical Engineering Tutorial, please read the originial post: here

Share the post

Polynomials and Curve Fitting in MATLAB

×

Subscribe to Electrical Engineering Tutorial

Get updates delivered right to your inbox!

Thank you for your subscription

×