Question: A robot moves in a horizontal plane starting at ( 0 , 0 ) . The robot can move UP , DOWN, LEFT and RIGHT
A robot moves in a horizontal plane starting at The robot can move UP DOWN, LEFT and RIGHT a given number of steps.
Write a function called robot direction, steps that takes inputs of the coordinates of the robot and the direction it moves and the number of steps and outputs the new coordinates of the robot.
Use your function to move the robot times where the number of steps are given by the digits of your student ID number and the direction follows the sequence UP RIGHT, DOWN, LEFT, UP etc. For example, if your student ID number is the robot will make the following movements:
steps UP;
steps RIGHT;
step DOWN;
steps LEFT;
steps Up;
etc.
Once the robot has completed its movements, output the distance from the start point using both Manhattan and Euclidean distances only using MATLAB
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
