The reason for this error might be due to MAT file corruption in the network drive.
Another indication of the MAT file being corrupt are error messages related to ‘HDF5’ appearing in MATLAB Command Window/Linux or MacOS Terminal/Windows Command prompt.
You can try to recover the non-corrupt portions or individual variables in the mat file using matfilecommand.
Consider for example that 'test.mat' has a variable 'v' that is unreadable. You can first get the size of this variable using the 'size' function as follows:
size(m,v) ans= 6 100
This tells us that the variable 'v' in 'test.mat' is a 2-D array which has 6 rows and 100 columns (a total of 600 values). You can then try to read the 'non-corrupt' values in 'v' and store them in a new array 'vRec' as follows :
vRec = zeros(6,100);
vRec(i,j) = m.v(i,j);
vRec(i,j) = NaN;
disp([int2str(i) ',' int2str(j) ' is unreadable.']);
The above code will try to read all the 'non-corrupt' values in 'v' and store them in 'vRec'. The corrupt values in 'v' will be stored as 'NaNs'