pcode
pcode('filename.m') creates a protected file 'filename.p' obfuscating the code. If both files are in the same folder, the m-file will have pritority over the p-file.
Examples
>>% if fun2encode.m is a user defined function in the working directory
dir# Name IsFolder SizeKB . 1 0 .. 1 0 fun2encode.m 0 9e-06 >> pcode('fun2encode.m') dir# Name IsFolder SizeKB . 1 0 .. 1 0 fun2encode.m 0 9e-06 fun2encode.p 0 1.1e-05 >> fileid = fopen('fun2encode.m','r')% show content of fun2encode.m
fgets(fileid)# disp('Example pcode') >> fileid = fopen('fun2encode.p','r')% show content of fun2encode.p
fgets(fileid)# SPEB!qKQUFeQIQWPl