Is there a way to see the source of a pcode file (.p) in MATLAB?

If by ‘open’ you mean edit – then certainly not. ‘p’ in pcode is for ‘protected’ – its main design goal is deploying a functional component while protecting its source.

If by ‘open’ you mean run – then certainly yes. Quoting the manual:

You invoke the resulting P-code file in the same way you invoke the MATLAB .m source file from which it was derived. For example, to invoke file myfun.p, type

[out, out2, …] = myfun(in1, in2, …);

Leave a Comment