use of mlintmex in mcc deployed code

1 view (last 30 days)
Gerrit
Gerrit on 15 Sep 2011
Hy there,
I've recently written a little tool where similar functions were grouped as subfunctions into one m-file. To enable these subfunctions to be called directly from anywhere outside of that m-file, I implemented a primary function that uses mlintmex to obtain the subfunctions' names and afterwards translates them into function handles. The source code looks something like that:
function fcns = main
str = mlintmex('-calls',which(mfilename));
fcns = regexp(str,'S0\s*\d+\s*\d+\s*(?<name>\w+)\n','names');
fcns = cell2struct(cellfun(@str2func,fcns.name},'UniformOutput',false),{fcns.name},2);
end % main
function sub1
...
end % sub1
function sub2
...
end % sub2
Sadly I cannot use the mlintmex function in mcc deployed software. Does anyone know an alternative solution?
btw: splitting up the subfunctions into separate program files is not an option, so I'm really just searching for a workaround in deployed/compiled mode.
Thanks

Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!