create point betweem two points
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Majid Al-Sirafi
le 15 Juil 2012
Modifié(e) : Walter Roberson
le 28 Jan 2018
Hi every one
I have two points, for example
(2,5)-(10,15)... how can I create a new point between them???
thanks a loot
majid
0 commentaires
Réponse acceptée
Walter Roberson
le 15 Juil 2012
NumberNewPoints = 3;
xvals = linspace(2, 10, NumberNewPoints+2);
yvals = linspace(5, 15, NumberNewPoints+2);
pts = [xvals(:), yvals(:)];
Now the points are the rows.
11 commentaires
Walter Roberson
le 16 Juil 2012
Modifié(e) : Walter Roberson
le 28 Jan 2018
pts(1,:) %x,y for starting point
pts(2,:) %x,y for intermediate point
pts(3,:) %x,y for final point
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Fixed-Point Designer dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!