MATLAB Answers

Simultaneous reading of mat file allowed?

8 views (last 30 days)
CAM on 3 Dec 2019
Edited: CAM on 2 Jan 2020
I know it is bad to allow multiple users to write to a mat-file simultaneously (or one read while another is writing).
But can two users simultaneously read (only) from a mat-file? Or do we need to lock out other users while another performs any R/W operation?


Sign in to comment.

Accepted Answer

Vahila Kayithi
Vahila Kayithi on 27 Dec 2019
Having multiple instances of the same file is not recommended. A possible workaround for this issue would be to create a "lock" file for each instance of MATLAB. You can find an example on how to use the lock mechanism in the below link.

  1 Comment

CAM on 2 Jan 2020
I actually stumbled upon the cited page in a separate search the day after my initial query. I implemented it successfully in my application. Thank you for the response nonetheless.

Sign in to comment.

More Answers (0)

Sign in to answer this question.