Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: multi-object interpolate
Replies: 3   Last Post: Nov 16, 2012 9:50 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ha

Posts: 87
Registered: 11/30/09
multi-object interpolate
Posted: Nov 15, 2012 1:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I don't know if the title is correct for my question. Below is a simple example to illustrate my problem.

x = -5:5;
y = -5:5;

[X Y] = meshgrid(x,y);

Z1 = [
7.1 6.4 5.8 5.4 5.1 5.0 5.1 5.4 5.8 6.4 7.1
6.4 5.7 5.0 4.5 4.1 4.0 4.1 4.5 5.0 5.7 6.4
5.8 5.0 4.2 3.6 3.2 3.0 3.2 3.6 4.2 5.0 5.8
5.4 4.5 3.6 2.8 2.2 2.0 2.2 2.8 3.6 4.5 5.4
5.1 4.1 3.2 2.2 1.4 1.0 1.4 2.2 3.2 4.1 5.1
5.0 4.0 3.0 2.0 1.0 0.0 1.0 2.0 3.0 4.0 5.0
5.1 4.1 3.2 2.2 1.4 1.0 1.4 2.2 3.2 4.1 5.1
5.4 4.5 3.6 2.8 2.2 2.0 2.2 2.8 3.6 4.5 5.4
5.8 5.0 4.2 3.6 3.2 3.0 3.2 3.6 4.2 5.0 5.8
6.4 5.7 5.0 4.5 4.1 4.0 4.1 4.5 5.0 5.7 6.4
7.1 6.4 5.8 5.4 5.1 5.0 5.1 5.4 5.8 6.4 7.1 ];

Z2 = [
0 1 2 3 4 5 6 7 8 9 10
-1 0 1 2 3 4 5 6 7 8 9
-2 -1 0 1 2 3 4 5 6 7 8
-3 -2 -1 0 1 2 3 4 5 6 7
-4 -3 -2 -1 0 1 2 3 4 5 6
-5 -4 -3 -2 -1 0 1 2 3 4 5
-6 -5 -4 -3 -2 -1 0 1 2 3 4
-7 -6 -5 -4 -3 -2 -1 0 1 2 3
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2
-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 ];

Now I have a table of Z1(X,Y) and a table of Z2(X,Y) and I wanna interpolate the values of x and y for given (z1, z2), e.g., providing (z1, z2) = (2.9, 1), (x, y) is expected to be (2.5, 1.5).

Any existing function or any solution?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.