How to invert .p file to .m file

214 views (last 30 days)
file123
file123 on 13 Feb 2018
Answered: recent works on 3 Nov 2022
I have a file with a .p extension. How can I convert to .m file?
  1 Comment
recent works
recent works on 3 Nov 2022
not possible. only .m files to .p files possible.

Sign in to comment.

Accepted Answer

ES
ES on 13 Feb 2018
You cant do that.
https://in.mathworks.com/help/matlab/ref/pcode.html
  5 Comments
Stephen23
Stephen23 on 13 Feb 2018
"How can i solve this problem?"
What problem? You can use that .p file without converting it to anything else (that is the whole point of them). The task you were given even tells you exactly how: "To evaluate this function, simply type y = signal1(t) where t is a vector containing values of time".

Sign in to comment.

More Answers (2)

recent works
recent works on 3 Nov 2022
not possible. only .m files to .p files possible. mainly .p files helps to protect the important files

Benjamin Kraus
Benjamin Kraus on 13 Feb 2018
By design, there is no way to convert a P-coded file (a file with the .p extension) into a regular MATLAB file (a file with the .m extension). The conversion from MATLAB file to P-coded file is a one-way conversion. As the description on the pcode doc page ("Create protected function file") states, the purpose of creating a P-coded file is to obfuscate the code to protect the source code. If you could reverse the operation, there would be no point in converting to a P-file.

Tags

Community Treasure Hunt

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

Start Hunting!