I ran a test...
Running this from Matlab:
[~,List] = unix(sprintf('ls %s/*/*/*.out',pathname));
And then doing some manipulation to List to strip out the EOL and put the list of files into a cell array (e.g. "ListCell")... I get:
numel(List) equal to 35200 and numel(ListCell) = 400.
When I compile the code and run as a standalone executable I get:
numel(List) equal to 39208 and numel(ListCell) = 400.
So... just over 4000 extra characters in "List" from the compiled version than the Matlab version. You would think something like deblank or strtrim would help remove the extra characters... but it does nothing to help the situation. Displaying the result of:
ListCell{1}
at the command line appears to be exactly the same in either Matlab or the stand alone version. So does:
fprintf('>%s<\n',ListCell{1})
However, displaying the length of "ListCell{1}" gives a completely different result in Matlab than in the stand-alone version. Where are all the extra characters? I still have no idea.
Anyhow... changing ls to find in my UNIX call above did the trick. It was the solution that led to the least amount of other changes to my code.
Thanks for the suggestions.