File Exchange

image thumbnail

Pcode Release Utility

version 1.0 (4.61 KB) by

Create a one pcode file for the main function and the called functions together.

1 Download

Updated

View License

The tool "release_package_pcode" will package the main function <function_name> and its subfunctions together into one pcode "function_name.p" and also creates a help file(*.m) with just the user comments added in "function_name.m".
Syntax: >>release_package_pcode(<function_name>)
- <function_name> - Name of the main function that has to be distributed as pcode.
Output: <function_name>_release_<timestamp> release folder.

Here are activities done by this utility.
- Reads all the subfunctions of "<function_name>".
- Creates a new file with the name "<function_name>", and copies the main function and the all the subfunctions into this.
- Converts the new file as pfile "<function_name>.p".
- Lists and copies all the "other files" pcodes, mex files and others that are called by <function_name>.m to the user.
- Copies the help comments from the "<function_name>" and prints the help comments to a file "<function_name>.m"
All files are placed in directory release_files_<date>. If the directory already available, then it overwrites it.

Now the "<function_name>.p" and "<function_name>.m" are the distributable to the other users along with the "other files".

Constraint: All functions should use either one of the closing command "return" or "end" uniformly between them. Else the function will stop the pcode conversion.

Demo: Please download the files.
Add the "demo_development_folder" into MATLAB path. Browse the contents in the folders. 'main_sample_function' is the main function for this development folder. Call the pcode tool as follows,
>> release_package_pcode('main_sample_function')
It will create a folder with the name "<function_name>_release_<timestamp>

Please share your comments and suggestions for any improvements.

Comments and Ratings (0)

MATLAB Release
MATLAB 7.11 (R2010b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

pcode_generation/demo_development_folder/folder_one/

pcode_generation/demo_development_folder/folder_two/

pcode_generation/demo_development_folder/

pcode_generation/