Create protected function file
pcode(fun)
pcode(fun1,...,funN)
pcode(fun,'-inplace')
pcode(fun)
obfuscates the
code in fun.m
and produces a file called fun.p
,
known as a P-file. If fun
is a folder, then all
the script or function files in that folder are obfuscated in P-files. MATLAB® creates
the P-files in the current folder. The original .m
file
or folder can be anywhere on the search path.
pcode(fun1,...,funN)
creates N
P-files
from the listed files. If any inputs are folders, then MATLAB creates
a P-file for every .m
file the folders contain.
pcode(fun,'-inplace')
creates
P-files in the same folder as the script or function files.
The pcode
function obfuscates your
code files, it does not encrypt them. While the
content in a .p
file is difficult to understand,
it should not be considered secure. It is not recommended that you
P-code files to protect your intellectual property.
The pcode
function does not support live scripts or
live functions (.mlx
).
|
MATLAB file or directory containing MATLAB files.
If An input argument with no file extension and that is not a folder must be a function in the MATLAB path or in the current folder. When using wild cards |
The pcode
algorithm was redesigned
in MATLAB 7.5 (Release R2007b). If your P-file was generated
prior to MATLAB 7.5, it will not run in MATLAB 8.6 (Release
R2015b) or later. Files generated in 7.5, or later versions, cannot
run in MATLAB 7.4 or earlier.
When obfuscating all files in a folder, pcode
does
not obfuscate any files within subfolders.
A P-file takes precedence over the corresponding MATLAB code
file (.m
) for execution, even after modifications
to the code file.
MATLAB does not display any of the help comments
that might be in the original MATLAB code file (.m
).