How do I create an interactive connected graph in MATLAB GUI
显示 更早的评论
I want to create a connected graph in Matlab GUI. All the nodes of the graph are buttons which changes its color when clicked. Adding the buttons in GUI is easy but how do I add the lines between any 2 nodes depending on the adjaceny matrix?
Example of such a graph:

2 个评论
Geoff Hayes
2015-7-4
Jigar - what code have you written so far? Are you using GUIDE?
Jigar Gada
2015-7-6
回答(1 个)
Sreeram Mohan
2015-7-7
0 个投票
Hi Jigar,
Have you tried looking at properties of the button i.e. set or get properties and may be there is one related to the current location of the pushbutton. You could use that to draw a line between the positions returned. I have not tried this but could be an approach to try !!
--sreeram
类别
在 帮助中心 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!