add a number of nodes N between two known nodes

1 次查看(过去 30 天)
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

采纳的回答

Voss
Voss 2024-8-10
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 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by