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

6 visualizaciones (últimos 30 días)
Ajay Paudyal
Ajay Paudyal el 24 de Sept. de 2017
Editada: Jan el 25 de Sept. de 2017
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 comentarios
per isakson
per isakson el 24 de Sept. de 2017
Editada: per isakson el 24 de Sept. de 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 el 24 de Sept. de 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 ?

Iniciar sesión para comentar.

Respuestas (1)

Jan
Jan el 25 de Sept. de 2017
Editada: Jan el 25 de Sept. de 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.

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by