
628 Accelerating MATLAB
®
Performance
pcode('myFunction.m'); % p-code a specific m-file
pcode('*.m'); % p-code multiple m-files in the current folder
The reality is that the MATLAB source code is only interpreted once per each MATLAB
session, when the code is rst encountered. The interpreted (p-code) version is then kept in
MATLAB memory for possible later reuse. The full list of MATLAB les that are currently
loaded can be seen with the built-in inmem function. We can use the clear all command
to clear these functions from memory (along with the workspace variables). But in the
vast majority of cases, our m-les will only be interpreted once ...