add a number of nodes N between two known nodes
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Voss
le 10 Août 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!