I use the LS command to obtain a list of all the MAT files in a directory and its subdirectories. When I put them in a string, I notice that the first few lines that are displayed are garbage.
A similar unexpected behavior occurs when I execute other linux commands from MATLAB using the SYSTEM command.
Best Answer