node creation using for loop
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
how can we create nodeset having data like node_number, x,y,z coordinates say for 20 nodes using for loop
Risposte (2)
KSSV
il 10 Set 2020
This should help you:
Also have a look on:
0 Commenti
Ameer Hamza
il 10 Set 2020
Try using graph() object provided by MATLAB: https://www.mathworks.com/help/releases/R2020a/matlab/ref/graph.html. For example,
node_ID = string(1:20);
x = rand(20,1);
y = rand(20,1);
z = rand(20,1);
G = graph(zeros(20), node_ID);
G.Nodes.x = x;
G.Nodes.y = y;
G.Nodes.z = z;
plot(G)
0 Commenti
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!