
Convert m File into p File in MATLAB

Convert m File into p File in MATLAB
- Suppose you have created your m-file and you are now want to protect your code and the send the rest to your employer so that he can use it without knowing the code inside it.
- Use these command to do this :
pcode(fun) pcode(fun1,...,funN)
- If fun is the name of the m-file then MATLAB will conver the fun.m to fun.p and create it in the same folder.
- If fun is the name of the folder then MATLAB will convert all the m-files within that folder into p-files.
- If you want to convert more than one m-file into p-file then use the second code and place all the m-files there.
- You can also convert more than one folder using the second command.
×
![]()








