how to convert a p code to .m file with Matlab student version 2016

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

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

Thanks for your concern and prompt reply...the author stating the p code will run on Matlab 2016....I have NO practical experience how to run p code...seems to me it dies not run like a .m file..? ? Can you advise asap? Thanks again... Regards Derya Kibar PhD cand
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.
"...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!

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!