How do i create a system of interconnected nodes?

Hi evreyone, i was wondering how I could build in matlab a system of nodes interconnected among them, No really need of ML.
Thank you for your attention

 Réponse acceptée

s = randi(10,12,1); t = randi(10,12,1);
G = graph(s,t);
plot(G)

4 commentaires

Andrea Miceli
Andrea Miceli le 29 Juin 2021
Modifié(e) : Walter Roberson le 29 Juin 2021
hello, I was not very precise in the question. I would need more than such a simple system, the composition of a graph, I would have to create a code to make the nodes communicate with each other. As in the attached photo.
Is the requirement that Walter's code fails to satisfy that you want the edges to have a direction associated with them? If so create a digraph instead of a graph.
If you want this diagram to actually be executable it seems like you might want a Stateflow® chart.
If there are other reasons why neither a digraph nor a Stateflow chart satisfy your needs, please explain your ultimate goal in more detail.
i am developing a graph system where the nodes (that are banks in my case) have to comunicate among them in order to see how an economical shock can expand into the inter-bank system. I was looking for some tools/funcion that could help me out in doing this. Stateflow looks like what i am really looking for. Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by