Create a function named X.m that when given the argument 'load' loads the value of X from a file and puts it into a persistent variable and uses mlock
For any other argument, including no argument, index the persistent variable and return that result.
- does not permit the user to store into the variable
- does not permit use of end as an index
You can possibly improve on this by defining an object with subsref and subsasgn behavior.
You cannot simply mlock a variable however.