To connect from the MATLAB® software to the EV3 Ultrasonic Sensor (item number 45504) use the
sonicSensor function to create a
To measure the distance from the sensor to the nearest object,
touchSensor object. The sensor uses ultrasonic
sonar to measure the distance to the nearest object, and returns the
measurement value in meters.