create point betweem two points
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Walter Roberson
2012 年 7 月 15 日
NumberNewPoints = 3;
xvals = linspace(2, 10, NumberNewPoints+2);
yvals = linspace(5, 15, NumberNewPoints+2);
pts = [xvals(:), yvals(:)];
Now the points are the rows.
11 件のコメント
Walter Roberson
2012 年 7 月 16 日
編集済み: Walter Roberson
2018 年 1 月 28 日
pts(1,:) %x,y for starting point
pts(2,:) %x,y for intermediate point
pts(3,:) %x,y for final point
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Polygons についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!