이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Help with basic problem

조회 수: 5 (최근 30일)
DDDD 2014년 10월 27일
마감: MATLAB Answer Bot 2021년 8월 20일
If I walk from point A to point B, with pace length of C, how many steps must I take to go from A to B, to be within 0.2m of B. Plot step size against number of steps required,

답변 (1개)

Andrew Reibold
Andrew Reibold 2014년 10월 27일
편집: Andrew Reibold 2014년 10월 27일
steps_required = ceil(((B-.2)-A)/C)
Explanation: Assuming you want to take the minimum amount of steps, the distance you MUST travel is the difference between B-A, with a grace of .2
Divided that distance by your step length, and you get the number of steps (round UP).
I'll let you do the critical thinking for the second part. This sounds like a homework problem.
  댓글 수: 1
DDDD 2014년 10월 27일
So ceil is a "ceiling" function? Thanks

Community Treasure Hunt

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

Start Hunting!

Translated by