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)?

조회 수: 2 (최근 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에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by