As I understand from the post, you want to find the measurement noise covariance matrix for the IMU sensor, from the data that has been acquired by it.
Measurement noise covariance is a metric used in Kalman filtering that is unique the sensor and is usually fine-tuned iteratively to improve filter performance. It is usually set to an initial value, determined using the noise properties of the system. Refer to this link for more details about the measurement noise covariance - https://www.mathworks.com/help/control/ref/ss.kalman.html#mw_4a7e9979-1683-41b8-84fc-5760d639fae8:~:text=In%20practice%2C%20you%20determine%20the%20appropriate%20values%20for%20R%20by%20measuring%20or%20making%20educated%20guesses%20about%20the%20noise%20properties%20of%20your%20system.
The covariance of the IMU data that has been acquired, however can be found using the “cov” function. To achieve this, use the “cov” function to compute the covariance matrix. For more information about the “cov” function, refer to this link - https://www.mathworks.com/help/matlab/ref/cov.html.
Hope this helps!