To connect from the MATLAB software to the EV3 Large or Medium Motor (item number 45502 or 45503), use the motor function to create a motor object.

  • To control the speed and direction of the motor, assign a value to the Speed property of the motor object. Input values range from -100 to 100 (full reverse to full forward). The default value of the Speed property is 0. You can change this value while the motor is running or stopped.

  • To start and stop the motor, use the start and stop functions with the motor object.

  • To measure the total rotation of the motor in degrees, use the readRotation function with the motor object. Driving the motor forward increases the value. Driving the motor in reverse decreases the value.

  • To reset the number of degrees to zero, use the resetRotation function with the motor object.