How to use "gplot" function?
Show older comments
Hey Every body;
I want to graph a matrix using "gplot" function, i had get the each object boundary in the image using the following:
[B L N A]=bwboundaries(bw,'noholes');
through that function i got 4 output: L for label matrix / N is no. of object found/ A is adjacent matrix...
To graph that labeled image i have 2 thoughts :
1- consider each boundray as a separate matrix a get it's coordinates and plot
as follow
[i j]=find(cell2mat(B(2,:));
gplot(B(2,:), [i j]);
but the result is a separate straight line!!
2- consider each connected component in the labeled matrix as anode then get it's coordinate and plot graph connecting those nodes
(i think that the second option is more reliable but i don't know how to implement regarding my poor )
Thanks A lot
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!