ru24.pro
News in English
Сентябрь
2024
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

1-D data interpolation (table lookup)

1-D data interpolation (table lookup)collapse all in pageSyntaxvq = interp1(x,v,xq)vq = interp1(x,v,xq,method)vq = interp1(x,v,xq,method,extrapolation)vq = interp1(v,xq)vq = interp1(v,xq,method)vq = interp1(v,xq,method,extrapolation)pp = interp1(x,v,method,'pp')Descriptionexamplevq = interp1(x,v,xq) returnsinterpolated values of a 1-D function at specific query points usinglinear interpolation. Vector x contains the samplepoints, and v contains the corresponding values, v(x).Vector xq contains the coordinates of the querypoints.If you have multiple sets of data that are sampled at the samepoint coordinates, then you can pass v as an array.Each column of array v contains a different setof 1-D sample values.examplevq = interp1(x,v,xq,method) specifies an alternative interpolation method: 'linear', 'nearest', 'next', 'previous', 'pchip', 'cubic', 'v5cubic', 'makima', or 'spline'. The default method is 'linear'.examplevq = interp1(x,v,xq,method,extrapolation) specifiesa strategy for evalua...