MATLAB App with P-Code?

9 views (last 30 days)
John R.
John R. on 24 Oct 2014
Hello,
I am interested in creating a MATLAB App using P-code. First, I have converted all of my files into p-files and they are in the current folder along with their corresponding m-files.
If I select an m-file for the Main File, it will find the all m-files that are linked with that Main File instead of finding the p-files. So that's no good.
If I delete all of the m-files from the current folder (instead of the Main File), leaving just the p-files, it will find only a small few of the p-files that are linked with the Main File. For each p-file that it finds, it outputs this warning to the command window:
Warning: Requirements cannot analyze P-code unless the user provides a corresponding M-code along with the P-code in the same folder. The dependencies of C:\...\...\...\xyz.p may not be included in the completion because its corresponding M-code cannot be found by REQUIREMENTS.
It seems like it's saying that it needs the m-files to determine the dependencies of the p-files. But if I leave the m-files in the current folder, then it select those to be in the App instead of the p-files.
I did some testing and even with these warnings, I can create a working App. And when I go into the App folder, it contains p-file and not m-files.
Thanks!

Answers (1)

Maneet Kaur Bagga
Maneet Kaur Bagga on 5 Jul 2022
As per my understanding you are p-coding all the files to run the app. There might be a possibility that the Main file which you are running is not p-coded and hence it is throwing an error. You must be in an outer directory to p code the folder containing the files you want to convert. Deleting the m-files will delete your source code and hence might create difficulty for you ahead. Hope it helps!

Categories

Find more on Programming 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!