필터 지우기
필터 지우기

how to linearly interpolate 2D matrix at a point (x,y)

조회 수: 9 (최근 30일)
Matlab_Student
Matlab_Student 2018년 3월 22일
편집: Jan 2018년 3월 26일
X: x-coordinate values, Y: y-coordinate values. These correspond to Values as the 2D table. interpolate the value at (2.5,3.5) but my code doesn't work. receive error of wrong input arguments
interpolatedvalue = interp2(X,Y,Values,2.5,3.5);
  댓글 수: 1
Akira Agata
Akira Agata 2018년 3월 26일
X, Y and Values should be full grid matrix or grid vector. Please check these variables in your code and the following documentation page.

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

답변 (1개)

Jan
Jan 2018년 3월 26일
편집: Jan 2018년 3월 26일
Please post a copy of the complete error message and show us the inputs.
This works fine:
X = rand(4, 5);
interp2(1:5, 1:4, X, 2.5, 3.5)
% Not: 1:4, 1:5 !!!

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by