MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > count number of triangles in a diagram 

Subject: count number of triangles in a diagram From: Faisal Ahmed Date: 5 Aug, 2010 08:50:10 Message: 1 of 9 
I have some coordinates and I have drawn a network with lines using "line" function. so there are some lines, some triangles, some quadrilaterals etc. is there any way in MATLAB that can automatically tell me only how many triangles are there and what are their vertices? tha'd be a life saver. thank you. 
"Faisal Ahmed" <fap87@yahoo.com> wrote in message <i3du01$maa$1@fred.mathworks.com>... 
Subject: count number of triangles in a diagram From: Walter Roberson Date: 5 Aug, 2010 14:59:53 Message: 3 of 9 
Faisal Ahmed wrote: 
Subject: count number of triangles in a diagram From: ImageAnalyst Date: 5 Aug, 2010 18:07:04 Message: 4 of 9 
It's kind of kludgy but it might work. What if he saved the diagram 
Subject: count number of triangles in a diagram From: Doug Hull Date: 5 Aug, 2010 18:24:04 Message: 5 of 9 
Post an example with an annotated version showing what you consider the correct answer. 
Subject: count number of triangles in a diagram From: Walter Roberson Date: 5 Aug, 2010 18:48:59 Message: 6 of 9 
ImageAnalyst wrote: 
Subject: count number of triangles in a diagram From: Doug Hull Date: 5 Aug, 2010 19:04:05 Message: 7 of 9 
If you only want the smallest triangles. Would a voronoi diagram help? Number of meet points that are not connected to any other meet points would be triangles. 
Subject: count number of triangles in a diagram From: Roger Stafford Date: 5 Aug, 2010 19:07:20 Message: 8 of 9 
"Faisal Ahmed" <fap87@yahoo.com> wrote in message <i3du01$maa$1@fred.mathworks.com>... 
Subject: count number of triangles in a diagram From: Roger Stafford Date: 5 Aug, 2010 20:34:04 Message: 9 of 9 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i3f258$a98$1@fred.mathworks.com>... 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.