add a number of nodes N between two known nodes
2 views (last 30 days)
Show older comments
How can I add a number of nodes N between two known nodes present in 'NODES'?
NODES = [-41.9153 -20.1597 65.3012;
-33.2487 -10.7068 7.4146];
figure
plot3(NODES(:,1),NODES(:,2),NODES(:,3),'k.','Markersize',30);
axis equal
0 Comments
Accepted Answer
Voss
on 10 Aug 2024
NODES = [-41.9153 -20.1597 65.3012;
-33.2487 -10.7068 7.4146];
N = 5;
t = linspace(0,1,N+2);
t([1 end]) = [];
NODES_new = interp1([0 1],NODES,t);
figure
plot3(NODES(:,1),NODES(:,2),NODES(:,3),'k.','Markersize',30);
hold on
plot3(NODES_new(:,1),NODES_new(:,2),NODES_new(:,3),'r.','Markersize',30);
axis equal
0 Comments
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots 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!