Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Help with basic problem

1 visualización (últimos 30 días)
DDDD
DDDD el 27 de Oct. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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,

Respuestas (1)

Andrew Reibold
Andrew Reibold el 27 de Oct. de 2014
Editada: Andrew Reibold el 27 de Oct. de 2014
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 comentario
DDDD
DDDD el 27 de Oct. de 2014
So ceil is a "ceiling" function? Thanks

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by