Need help with an Interpolation (bilinear?)

조회 수: 3 (최근 30일)
John
John 2013년 4월 9일
First, I'm not well versed in MATLAB...
Here is the problem I'm trying to solve. I have 4 vectors, that define a top, bottom, left, and right boundary. So for example xtop=[1 2 3 4 5 6 7] xbottom is the same length 1x7 and yright is 1x50 and yleft is 1x50. I want to form a mesh by interpolating between these boundaries. So I would end up with a matrix that is 50x7 and is an interpolation of the data on the boundaries of the matrix. The data on the boundaries is defined by the four vectors with the obviously equal "corners". The data in the boundary vectors isn't necessarily monotonic. Are there functions in matlab that can do this type of interpolation? Thanks for your help.

채택된 답변

Image Analyst
Image Analyst 2013년 4월 10일
편집: Image Analyst 2013년 4월 10일
Yes. Interp1(), or meshgrid(), depending on what form you want the output in. Or you could try TriScatteredInterp() or even roifill() (if you have the Image Processing Toolbox).
  댓글 수: 1
John
John 2013년 4월 13일
I found a way using interp1(). Thanks for your help

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

추가 답변 (0개)

카테고리

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