how to convert a p code to .m file with Matlab student version 2016
3 views (last 30 days)
Show older comments
I have downloaded the MATLAB p codes from the book of E F Camacho on Model Predictive Control 2nd edition..I do not know how to convert p codes to .m files ...I have a MATLAB student version license 2016..
Can someone help me URGENTLY..??
Accepted Answer
James Tursa
on 8 Sep 2017
p code is encrypted. The author typically uses p code because he/she doesn't want the user to be able to recover the original m code (hiding proprietary algorithms, etc).
3 Comments
James Tursa
on 8 Sep 2017
You run the p code just like you run an m file. Just put the p code file on your path somewhere and call it's name just like you would call it if it was an m file.
Stephen23
on 9 Sep 2017
Edited: Stephen23
on 9 Sep 2017
"...seems to me it dies not run like a .m file..?"
One of the nice things about MATLAB is that it has something we volunteers like to call "documentation". The "documentation" describes how MATLAB works, which means instead of guessing how to call p-files we can simply read the "documentation" which tells us exactly how to call p-files. And because the "documentation" is all online our favorite internet search engines can search it too!
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!