The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: define matrix in griddata function
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List

Posts: 13
Registered: 1/18/08
define matrix in griddata function
Posted: Dec 10, 2012 6:41 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi: For example I have a matrix as following,

x = [1.0 1.2 3.0 4.0];
y = [2.0 2.7 4.1 5.0];
M = [1.1 x x x;
x 1.3 2.1 x;
2.2 x x 1.6;
x x 1.5 1.8];

[xi yi]= meshgrid(1:4,2:5);
zi = griddata(x,y,M,xi,yi);

In M, all x are holes (have no value). My question is how can I give value M in griddata function above to interpolate the scattered data into the holes x in M?

I appreciate your help.


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.