How to run a .p file on matlab 2015a, but .p file was created on 2007 version?

6 views (last 30 days)
I was trying to access the .p file, created on 2007 version, on 2015a version. I got this error:
Warning: The P-code file system01.p was generated prior to MATLAB version 7.5 (R2007b) and will not be supported in a
future release. Use pcode to regenerate system01.p using MATLAB R2007b or later.
Error using system01 (line 10)
Not enough input arguments.
  2 Comments
per isakson
per isakson on 24 Sep 2017
Edited: per isakson on 24 Sep 2017
Doc says:
The pcode algorithm was redesigned in MATLAB 7.5 (Release R2007b).
If your P-file was generated prior to MATLAB 7.5, it will not run
in MATLAB 8.6 (Release R2015b) or later. Files generated in 7.5,
or later versions, cannot run in MATLAB 7.4 or earlier.
Are you sure you are running R2015a?
Walter Roberson
Walter Roberson on 24 Sep 2017
That appears to be a warning, and it appears that you simply did not pass enough input arguments. What happens if you experiment with adding more input arguments ?

Sign in to comment.

Answers (1)

Jan
Jan on 25 Sep 2017
Edited: Jan on 25 Sep 2017
You have 2 problems:
  1. The function has an old P-code format. This is a warning only, which means, that the function will not be supported in a future release. You can either ignore the warning or ask the author for a version, which has been P-coded with a modern Matlab version.
  2. The function is called with too few input arguments. This is a hard error, which can be solved by providing all required inputs. Read the corresponding documentation.
The old P-code format was changed in R2007b, because the encryption was not secure. A decryption of the file will most likely conflict with the terms of use of this function, because P-coding is applied usually to prevent a reverse engineering. A reverse engineering of the encryption method of old P-files is illegal also according to the license conditions of Matlab.

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!