node creation using for loop
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
6 Commenti
KSSV
il 10 Set 2020
Attach your data.
Shahrukh s
il 10 Set 2020
KSSV
il 10 Set 2020
You cannot have 20 nodes for given x and y. You will have more number of nodes. Check the links given in the answer.
Steven Lord
il 10 Set 2020
What do you want to do with this data once you've chosen the "best" data structure to store your nodeset? Plot it? Connect nodes into a network graph? Something else?
Shahrukh s
il 10 Set 2020
KSSV
il 10 Set 2020
x = 100:120 ;
y =10:20 ;
[X,Y] = meshgrid(x,y) ;
mesh(X,Y)
Risposte (2)
KSSV
il 10 Set 2020
0 voti
This should help you:
Also have a look on:
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)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!