How do I create an interactive connected graph in MATLAB GUI

5 visualizaciones (últimos 30 días)
Jigar Gada
Jigar Gada el 30 de Jun. de 2015
Respondida: Sreeram Mohan el 7 de Jul. de 2015
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 comentarios
Geoff Hayes
Geoff Hayes el 4 de Jul. de 2015
Jigar - what code have you written so far? Are you using GUIDE?
Jigar Gada
Jigar Gada el 6 de Jul. de 2015
Hi Geoff,
I have not written any code yet. I am still stuck on the logic to generate a dynamic GUI based on the adjacency matrix. Even if one can figure how to draw lines in the GUI, I can write codes to draw dynamic GUIs.

Iniciar sesión para comentar.

Respuestas (1)

Sreeram Mohan
Sreeram Mohan el 7 de Jul. de 2015
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

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by