Question: what is mlock function in matlab?
Answer: mlock locks the currently running function in memory. Locking a function prevents clear from removing it from memory, and prevents reinitialization of any persistent variables defined in the file. Use mlock only within a MATLAB® code file.