I have a written a MATLAB program that creates custom MATLAB functions on the fly and launches them in other MATLAB instances using unix command. I use this program for automatizing fMRI neuroimaging analyses (using SPM8 for MATLAB), and everything works fine. However, MATLAB imposes a function name length maximum of 63 characters (namelengthmax). As I need to save two different timestamps in each function name together with the name of the function that created it (I have several different functions that create these new functions that are used for multithreaded fMRI analysis), 63 characters is quite limiting for filenames like:
atf_2012_07_05_18_01_02_specify_1st_level_2012_07_05_18_10_15.m
In this example atf means 'analysis thread function' (to separate it from other files with similar filenames), the first timestamp identifies the run (a global timestamp, it this case 5th of July 2012 at 18:01:02), then there's a string specify_1st_level that identifies the function (in this case specify_1st_level.m) that created this new 'analysis thread function', and then the second time stamp identifies this specific new 'analysis thread function' from other new 'analysis thread functions' created to be run in other threads (and for different analysis subjects, or for different analyses) and that are run simultaneously.
My problem is the character limit of 63 characters for function names.
I'm aware that I could write my timestamps without underscores (_), or compress them, and I can make my function names shorter (eg. specify_1st_level.m -> sp1st.m), and also I could divide my functions created on the fly in different subfolders also created on the fly named eg. with global timestamps. Edit: Or I could even create a hash of the entire function name and use the hash as a function name instead of the human-readable string presented above.
However, I plan to add more data in the names of 'analysis thread functions' (one or more hash values of different analysis parameter sets used in this run to identify identical analyses of different times). If possible, I would like to keep it nice and simple (human-readable function names help in debugging of 'analysis thread functions' created on the fly).
So, is there any way to extend namelengthmax ? I'm running MATLAB R2012a in Linux. I'm also happy to hear any other ways to solve this issue.
namelengthmaxas that is what sets the max. I doubt that it can be changed though.