Для ботов

## Interpolation

Documentation Help Center. Use scatteredInterpolant to perform interpolation on a 2-D or 3-D data set of scattered data. Use griddedInterpolant to perform interpolation with gridded data. Vectors x and y specify the x,y coordinates of the sample points. The rows of P contain the xy or xyz coordinates for the values in v. Specify Method as the last input argument in any of the first three syntaxes. Pass Method and ExtrapolationMethod together as the last two input arguments in any of the first three syntaxes. Method can be: 'nearest''linear'or 'natural'. ExtrapolationMethod can be: 'nearest''linear'or 'none'. Sample points, specified as vectors of the same size as v. The sample points should be unique. However, if the sample points contain duplicates, scatteredInterpolant displays a warning and merges the duplicates into a single point. Sample points array, specified as an m -by- n matrix, where m is the number of points and n is the dimension of the space where the points reside. Each row of P contains the xy or xyz coordinates of a sample point. Linear extrapolation based on boundary gradients. Default when Method is 'linear' or 'natural'. Nearest neighbor extrapolation. This method evaluates to the value of the nearest neighbor on the boundary. Default when Method is 'nearest'. No extrapolation. Any queries outside the convex hull of Points return NaN. Sample points, specified as a matrix. The size of the matrix is m -by- 2 or m -by- 3 to represent m points in 2-D or 3-D space. Each row of Points contains the xy or xyz coordinates of a unique sample point. The rows in Points correspond to the function values in Values. Function values at sample points, specified as a vector of values associated with each point in Points. Interpolation method, specified as 'linear''nearest'or 'natural'. See Method for descriptions of these methods. Extrapolation method, specified as 'nearest''linear'or 'none'. See ExtrapolationMethod for descriptions of these methods. Use scatteredInterpolant to create the interpolantF. Then you can evaluate F at specific points using any of the following syntaxes:. Each row in Pq contains the coordinates of a query point.