I wrote a standalone MATLAB function myfun.m, and I would like to share it with people who also have MATLAB. They can use the function, but I do not want them to see what is inside the function.
So far, I have seen one way to do this with pcode: I would create myfun.pwith pcode('myfun.m'), then I would divide myfun.pinto people. Is it correct?
The above approach has two problems:
- When I type
help myfun, I get No help found for myfun.p., although I created a short help for the original .m (via a comment right after the function declaration) - mathworks says the .p file contains a hidden rather than an encrypted version of the original .m
Is there any other approach besides pcodethat fixes one or both of the problems above?
source
share