File Exchange

image thumbnail

mklib: a pedestrian function library loader generator

version 1.0 (13.3 KB) by

creates a function library loader from a list of m-files (possibly with subfunctions)

0 Downloads

Updated

View License

MKLIB takes one or more list(s) of valid M-files and automatically creates a library loader function (M-file), which returns a structure of function handles to all the subfunctions found in those M-files

the structure's field names are set to the name of the subfunctions

this allows a user to directly access individual subfunctions from the parent M-file(s)

note the library does NOT have to be in the ML path after the handles are assigned!

see the accompanying published M-file for an example and look at
help mklib
for more information on handling of nested functions and possible duplicates

Comments and Ratings (1)

cool function but got the following error on Matlab R2015a

Error using cell/strmatch (line 19)
Requires character array or cell array of strings as inputs.

Error in mklib (line 252)
id=strmatch('SyntaxErr:EndCount',id(end,:).');

Updates

thanks to DR PER ISAKSSON, a most tedious omission was corrected; also, please note that MKLIB does(!) require r14.sp2 or higher to run due to some automatic typecasting issues within cells! current ver tag is 29-Jun-2005 19:42:59

mklib now takes one or more list(s) of functions, which are merged into the library loader
unfortunately, this required a change in syntax (sorry for this!)
ver tag is 14-Jun-2005 13:57:19

a superfluous duplicate in the loader's help section was removed; ver tag 10-May-2005 18:42:13

added listing of nested functions; engine now uses an undocumented mlint-feature and will not create a temp file anymore; ver tag 06-May-2005 14:46:16

MATLAB Release
MATLAB 7.0.1 (R14SP1)

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

» Watch video

html/