Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interpolating vector data in Matlab

Status
Not open for further replies.

AndrewSpotlight

Mechanical
Joined
Jul 5, 2011
Messages
8
Location
CA
Hi,

Suppose there are three parameters x,y,z, where z is a function of x,y such as z=f(x,y). If I know the value of z at a specific (x,y), for instance f(1,2)=11, f(2,3)=12, f(3,4)=13, f(4,5)=14, is there a way to get z value wrt different (x,y) via interpolation?

(in my case x,y,z are one-column vectors in the same form of n*1)

Thanks!!!
 
Why wouldn't there be?

It's only a question of how much complexity you want. In your specific numerical example, everything is on a line in xy space, so linear, bilinear, cubic, bicubic, sinc, spline, etc. are all possible interpolation approaches.

A more general 2-D fit would require a surface of some sort, which might be constructed from splines along diagonals.



TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
Thanks IRstuff!

I finally figured out how to do it =)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top