node creation using for loop
2 次查看(过去 30 天)
显示 更早的评论
how can we create nodeset having data like node_number, x,y,z coordinates say for 20 nodes using for loop
6 个评论
回答(2 个)
KSSV
2020-9-10
This should help you:
Also have a look on:
0 个评论
Ameer Hamza
2020-9-10
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!