MATLAB Answers


How can I open that MATLAB P Code?

on 4 Dec 2012


I am using MATLAB7.12.0(R20011a) version. I got one project from MATLAB File Exchange. That project contains so many matlab Files. But only one file contain P code extension. I can't open that File. How can I open that file. Please Help.

  1 Comment

About P-code : P-code

1 Answer

Answer by Walter Roberson
on 4 Dec 2012

You can use any good-quality editor that supports binary files. Even emacs if you must ;-)

Your difficulty will be in making any sense out of the file after you open it. pcoded (.p) files do not have any usable source code in them. If what you need is the source code, you will need to ask the author of the package for it, but do not be surprised if they say NO. (Blatant bribes of beer (in advance!!) might help, but even that is not certain.)


Jan Simon
on 4 Dec 2012

Usually offering money is more successful than beer.

It is a little bit strange to publish P-coded files in the FileExchange.

When I was covered by Conflict of Interest rules, I would have had to apply 4 steps up the hierarchy to accept even $1 in outside income, but I could accept physical gifts up to $5 "or as customary" (e.g., would cover 1 regular-sized bottle of beer.)

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!