Publisher review:Quadratic Interpolation - Interpolation at data midpoints using piecewise quadratic polynomials. [Xi,Yi] = QINTERP(X,Y) interpolates the 1-D data described by Y = f(X) at the midpoints between the points in X using piecewise quadratic polynomials. X need not be equally spaced.Xi contains X and all midpoints between adjacent pairs of values in X. If length(X) = N, then length(Xi) = 2*N - 1.Yi contains Y and the interpolated values associated with the midpoint values of X. Therefore, Yi is a quadratically smoothed interpolation of the original data describing Y = f(X).If X and Y are vectors, Xi and Yi are vectors as well. If X is a vector and Y is a matrix, Y must have as many rows as X has elements. In this case the interpolation is done down the rows of each column of Y and Yi is a matrix having as many columns as Y, but 2*N - 1 rows where N is the number of elements in X.[Xi,Yi,Zi] = QINTERP(X,Y,Z) interpolates the 2-D data described by Z = f(X,Y) at the midpoints between the points in X and Y. X and Y may be vectors defining the x- and y-axis data points. In this case, the number of elements in X must equal the number of columns in Z, and the number of elements in Y must equal the number of rows in Z. If X and Y are matrices the same size as Z, they are assumed to be 2-D plaid as produced by MESHGRID.
If X and Y are meshgrid type matrices, then output Xi and Yi are meshgrid matrices the same size as Zi. Otherwise, Xi and Yi are vectors containing X, Y and their midpoints. Zi is a matrix containing Z and the interpolated values associated with the data in Xi and Yi. If Z has r rows and c columns, Zi has 2*r - 1 rows and 2*c - 1 columns. If Xi and Yi are vectors, length(Xi) = 2*c - 1 and length(Yi) = 2*r - 1.Algorithm: To support non equally spaced X and MATLAB vectorization, a quadratic polynomial fitting approach is taken. A quadratic polynomial is fit to each sequence of three consecutive data points, e.g., X(i-1), X(i), and X(i 1) for i=2:length(X)-1.
These polynomials are then evaluated at the midpoints between their associated data points. Using this approach, one interpolant is computed between X(1) and X(2) as well as between X(end-1) and X(end). Two interpolants are available at all other midpoints. These interior interpolants are averaged. The output of this algorithm is smoother than linear interpolation and faster than cubic interpolation. Requirements: ยท MATLAB Release: R14SP3
Quadratic Interpolation is a Matlab script for Mathematics scripts design by Duane Hanselman.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Quadratic Interpolation - Interpolation at data midpoints using piecewise quadratic polynomials.
Operating system:Windows / Linux / Mac OS / BSD / Solaris