Code covered by the BSD License  

Highlights from
Toolbox Graph

image thumbnail
from Toolbox Graph by Gabriel Peyre
A toolbox to perform computations on graph.

test_grid_data.m
% test for data gridding
p = 7;
vertex = rand(2,p)*(n-1)+1;
face = delaunay(vertex(1,:), vertex(2,:));
v = vertex(1,:) .* vertex(2,:);     % X*Y function

% using the toolbox gridding (works for arbitray set of points)
n = 128;
M1 = griddata_arbitrary(face,vertex,v,n);

% using matlab gridding (works for grid sampling)
[Y,X] = meshgrid(1:n,1:n);
M2 = griddata(vertex(1,:), vertex(2,:), v, X,Y);

Contact us at files@mathworks.com