Described in table lookup terms, the table is and interp1 looks up the elements of xi in x, and, based upon their locations, returns values yi interpolated within the elements of Y. Interpolation is the same operation as table lookup. This function is shown below, along with the relationship between vectors x, Y, xi, and yi. It finds values at intermediate points, of a one-dimensional function that underlies the data. The interp1 command interpolates between data points. You can use any of the methods in the preceding table, except for 'v5cubic'. Pp = interp1(x,Y,method,'pp') uses the specified method to generate the piecewise polynomial form (ppform) of Y. Returns the scalar extrapval for out of range values. Uses the specified method to perform extrapolation for out of range values. For all other methods, interp1 performs extrapolation for out of range values. Īssumes that x = 1:N, where N is the length of Y for vector Y, or size(Y,1) for matrix Y.įor the 'nearest', 'linear', and 'v5cubic' methods, interp1(x,Y,xi,method) returns NaN for any element of xi that is outside the interval spanned by x.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |