Need help with an Interpolation (bilinear?)

2 views (last 30 days)
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.

Accepted Answer

Image Analyst
Image Analyst on 10 Apr 2013
Edited: Image Analyst on 10 Apr 2013
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 Comment
John
John on 13 Apr 2013
I found a way using interp1(). Thanks for your help

Sign in to comment.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!