Protected codes doesn't work on Matlab 2015b as function?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all, I have a code that uses different subroutines that have been protected, namely are now .p files (I also have the original .m files in the same folder). Running this code with Matlab 2014a had no problem at all. Recently I have upgraded to Matlab 2015b and if I try to run the same code it gave me the error about .p code being generated prior to MATLAB version 7.5 (R2007b) and is no longer supported. "Use pcode to regenerate the file using MATLAB R2007b or later." So I did that, I regenerated the .p codes with pcode using the original .m file. Now, I tried to run my main code and now it is telling me that I am trying to use SCRIPTS as function. Ok, I understand why it would say that but then why it use to work on Matlab 2014a?
I don't know if I was clear in my message but if someone can help I would really appreciate it!
Mirko
2 comentarios
Tom Langer
el 30 de Nov. de 2018
I'm having the same error...any Mathworks mods available to comment?
Jan
el 30 de Nov. de 2018
Please post the complete error message and the relevant part of the code. If a new P-coding let the error message occur, then the formerly existing P-files do not belong to the M-files you have. By the way: why do you protect code by P-coding, if you have the corresponding M-files available also?
Respuestas (2)
Mehmet Ali Öner
el 8 de Nov. de 2019
Hello there.
I had the same error. How did you create the .p file in the new version?
I get the following error message. What should I do? Please help me. My Matlab version (R2018b)
The P-code file C:\Users\aa05042\Desktop\lsbstegoprote\hidebits.p was generated prior to MATLAB version
7.5 (R2007b) and is no longer supported. Use pcode to regenerate the file using MATLAB R2007b or later.
Error in test_main (line 19)
[Irec] = hidebits(I,message);
1 comentario
Jan
el 13 de Nov. de 2019
Please do not post questions in the section for answers. Open your own question would be more useful.
To re-create a P-file you need to have the original M-file. If a P-file is accompanied by an M-file, which contains the help section only, the re-creation will work, but calling the function will fail with a message that you try to access a script as a function.
This means that you need eitehr the original M-file or that you have to contact the author to re-create the P-file.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!