Interpolating data set with two inputs

I have a 5x3 matrix of data ('d') that needs I need to interpolate using two inputs. I have a 5x1('y') and 3x1('x') array that are basically the axis' of the data. I want to be able to input an x and y value and return an interpolated value from the 5x3 data set. I've looked into the griddedInterpolant function but can not figure out how to set up the inputs. I've attached a picture for clarification, any help would be awesome. Thanks.

댓글 수: 1

Mathieu NOE
Mathieu NOE 2021년 1월 8일
hello
see interp2
help interp2
interp2 2-D interpolation (table lookup).
Vq = interp2(X,Y,V,Xq,Yq) interpolates to find Vq, the values of the
underlying 2-D function V at the query points in matrices Xq and Yq.
Matrices X and Y specify the points at which the data V is given.
Xq can be a row vector, in which case it specifies a matrix with
constant columns. Similarly, Yq can be a column vector and it
specifies a matrix with constant rows.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2021년 1월 7일

댓글:

2021년 1월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by