Question: number 3 only.Please code in matlab. . Assume we a solar panel on a platform attached a motor. Our motor is a step motor that
number 3 only.Please code in matlab..

Assume we a solar panel on a platform attached a motor. Our motor is a step motor that controls the angle of our solar panel. This means that it moves at a set increment of 0.01 degrees every time we tell it to move. Our panel will always start at an angle of theta_solar = 0 every day. Write a function that determines how many steps the step motor needs to increment to get within one step (0.01 degrees) of a given angle. It should take an input of an angle, and return two outputs: An integer number of steps. For instance, an input of -50.2525 degrees would return 5025 steps. A direction, positive or negative. This should be l for positive angles and -1 for negative angles. -50.2525 would return -1 for your second output. Write another function that simulates your step motor. It should take an angle in degrees and a direction (-1 or 1) as two inputs, and return a new angle that is either 0.01 degrees more or less than the input angle for positive and negative directions, respectively. For example, the inputs 90 and -1 would return the output 89.99. Assume we a solar panel on a platform attached a motor. Our motor is a step motor that controls the angle of our solar panel. This means that it moves at a set increment of 0.01 degrees every time we tell it to move. Our panel will always start at an angle of theta_solar = 0 every day. Write a function that determines how many steps the step motor needs to increment to get within one step (0.01 degrees) of a given angle. It should take an input of an angle, and return two outputs: An integer number of steps. For instance, an input of -50.2525 degrees would return 5025 steps. A direction, positive or negative. This should be l for positive angles and -1 for negative angles. -50.2525 would return -1 for your second output. Write another function that simulates your step motor. It should take an angle in degrees and a direction (-1 or 1) as two inputs, and return a new angle that is either 0.01 degrees more or less than the input angle for positive and negative directions, respectively. For example, the inputs 90 and -1 would return the output 89.99
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
