MEX-files and P-code are usually backwards compatible, which means you may be able to run any MEX-file or P-code that was created on an earlier version of MATLAB on later versions of MATLAB. If you do not observe this with a MEX-file, you may need to recompile the MEX-file from source code.
You may find that sometimes you will have forwards compatibility and a file created on a newer version of MATLAB runs on an older version of MATLAB, but this is not supported.
Best Answer