munlock(fun) unlocks the MATLAB® code file named fun. A function that is locked using mlock cannot be removed from memory with the clear command unless you first unlock it using munlock.
munlock unlocks the currently running file. Use this syntax only within a MATLAB code file.