Effacer les filtres
Effacer les filtres

Issue with for loop with different size of matrixes

1 vue (au cours des 30 derniers jours)
Dimo Iordanov
Dimo Iordanov le 22 Fév 2021
Hello,
I'm trying to add the neighbor triangles in delaunay triangulation. For some reason I am having issue with the size of the two matrices. Can you please help me?
v = neighbors(DT);
v(1,:)
for i = 1:size(v,2)
if isnan(v(1,i)) == 0
x21(i) = [DT.Points(DT.ConnectivityList(v(1,i),1),:),0];
area2(i) = 1/2.*abs((x21(2,1)-x21(1,1)).*(x21(3,2)-x21(1,2))-(x21(3,1)-x21(1,1)).*(x21(2,2)-x21(1,2)));
end
end

Réponses (0)

Catégories

En savoir plus sur Delaunay Triangulation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by