How to generate straight lines to 2D target points, each straight line is connected by 10 points which represent 10 steps from (0,0) to target point, for example (5,6)?

1 次查看(过去 30 天)
Hi, I am a beginner on MATLAB, recently I was stuck on a task, look forward to your help.
My question is How to generate straight lines to 2D target points, each straight line is connected by 10 points which represent 10 steps from (0,0) to target point, for example (5,6)?
Thank you very much
  3 个评论

请先登录,再进行评论。

采纳的回答

darova
darova 2021-4-4
What about this
x = rand(20,1);
y = rand(20,1);
line([x x*0]',[y y*0]')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by