MATLAB: Do I get an error when executing protected MATLAB (P-code) files

backwardcompatibleMATLABpcode

I execute a protected MATLAB (P-code) file and receive the following error:
??? D:\Matlab6p1\work\test.p is a P-file written by a newer version of MATLAB and cannot be read.

Best Answer

P-code files are not expected to be forward compatible, that is, a MATLAB file P-coded in a newer release of MATLAB is not expected to function when executed on an older release of MATLAB. If a P-code needs to be used over multiple releases of MATLAB, it should be created using the oldest release of MATLAB that will be executing the P-code.