https://www.mathworks.com/help/matlab/supportpkg/readrotationangle.html
readRotationAngle - Read rotation angle from gyroscopic sensor - MATLAB
This MATLAB function reads the total amount of rotation since the creation of the connection to the sensor, and returns the measurement in degrees.
rotation anglegyroscopic sensorreadmatlab