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

 Accepted Answer

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

4 Comments

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

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!