MATLAB Runtime Server | ![]() ![]() |
Organizing Files and Managing Startup Tasks
This example keeps its own non-startup files in toolbox\runtime\examples\gui
during the entire development, compilation, and testing process. If you change any application files while exploring this example, then use rehash toolboxreset
to register the changes.
The Startup Function
The example matlabrt.m
file, which the section Installing the Example Files instructed you to install in the toolbox\local
directory, is appropriate for this application because it:
off
pathdefrt
(not pathdef
)
amortsched
Creating the Path Definition Function
The example pathdefrt.m
file that you installed in toolbox\local
uses paths relative to the MATLAB root directory. Each distinct directory that contains a function used in this application is included on the runtime path.
Notice that the list of directories in the example pathdefrt.m
matches the list of (non-private, non-class) directories in the output of the depdir
function.
cleanp; % Remove all .p files from path. p = depdir('matlabrt') p = 'C:\matlab\toolbox\matlab\datafun' 'C:\matlab\toolbox\matlab\datafun\@cell' 'C:\matlab\toolbox\matlab\datatypes' 'C:\matlab\toolbox\matlab\elfun' 'C:\matlab\toolbox\matlab\elmat' 'C:\matlab\toolbox\matlab\general' 'C:\matlab\toolbox\matlab\general\@char' 'C:\matlab\toolbox\matlab\graph3d' 'C:\matlab\toolbox\matlab\graphics' 'C:\matlab\toolbox\matlab\graphics\private' 'C:\matlab\toolbox\matlab\iofun' 'C:\matlab\toolbox\matlab\lang' 'C:\matlab\toolbox\matlab\ops' 'C:\matlab\toolbox\matlab\ops\@cell' 'C:\matlab\toolbox\matlab\specfun' 'C:\matlab\toolbox\matlab\strfun' 'C:\matlab\toolbox\matlab\strfun\@cell' 'C:\matlab\toolbox\matlab\uitools' 'C:\matlab\toolbox\local' 'C:\matlab\toolbox\runtime\examples\gui'
The path omits private and class directories, while listing their parent directories instead. For example, pathdefrt.m
lists toolbox\matlab\ops
, but not toolbox\matlab\ops\@cell
.
![]() | Adapting the Design for Runtime Execution | Compiling the Application | ![]() |