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

6 次查看(过去 30 天)
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 个评论
per isakson
per isakson 2017-9-24
编辑:per isakson 2017-9-24
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 2017-9-24
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 ?

请先登录,再进行评论。

回答(1 个)

Jan
Jan 2017-9-25
编辑:Jan 2017-9-25
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.

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by