creating adjacancy matrix for delaunay

Hi everyone,
I wrote this code and i want to create adjacancy matrix however i could not. is there anyway to do that?
L = linspace(0,2.*pi,6); xv = cos(L)';yv = sin(L)';
% 6 yi arttırınca yuvarlağa yaklaşıyor. Kenar sayısı kısaca o.
xv = [xv ; xv(1)]; yv = [yv ; yv(1)];
xmin = -5;
xmax = 5;
npts = 500;
x = xmin + (xmax-xmin)*rand(npts,1);
ymin = -5;
ymax= 5;
y = ymin + (ymax-ymin)*rand(npts,1);
p=[x y];
in = inpolygon(x,y,xv,yv);
tri = delaunay(x,y);
triplot(tri,x,y)
hold on
plot(xv,yv,x(in),y(in),'r*',x(~in),y(~in),'go');

Answers (0)

Asked:

on 19 Feb 2014

Community Treasure Hunt

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

Start Hunting!