Protected codes doesn't work on Matlab 2015b as function?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Jan
il 30 Nov 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?
Risposte (2)
Mehmet Ali Öner
il 8 Nov 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 Commento
Jan
il 13 Nov 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.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!