Need help with an Interpolation (bilinear?)

3 vues (au cours des 30 derniers jours)
John
John le 9 Avr 2013
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.

Réponse acceptée

Image Analyst
Image Analyst le 10 Avr 2013
Modifié(e) : Image Analyst le 10 Avr 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 commentaire
John
John le 13 Avr 2013
I found a way using interp1(). Thanks for your help

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by