From: Ruska R on 6 Jun 2010 19:31 > I have not yet figured this out. Anybody who has used matlab for vornoi areas before, please feel free to chime in. Hi Dave! I have the same problem, and I think that I found (partial) solution. If variables x and y define the vertex pairs, try with the code: [c, f] = voronoin ([x, y]); af = zeros (size(f)); for i = 1 : length (f) af(i) = polyarea (c (f {i, :}, 1), c (f {i, :}, 2)); end or: [v , c] = voronoin(sdata); for i = 1 : size(c ,1) ind = c{i}'; tess_area(i,1) = polyarea( v(ind,1) , v(ind,2) ); end But in both cases you will face the problem what if some Voronoi tiles are unbounded. For that problem, I haven't found solution yet.
|
Pages: 1 Prev: compiler toolbox help: processor mismatch Next: creating variables in function from strings |