MLSTRIPCOMMENTSFILE Strip comments from a file with MATLAB code. MLSTRIPCOMMENTSFILE(INFILE, OUTFILE) reads the m-file INFILE, line by line, strips all MATLAB comments , and writes the result to the file OUTFILE. Note that you should never specify the same value for INFILE and OUTFILE. Since the output file is opened for writing before any data is read from the input file, the file will be empty and the data will be lost. See also MLSTRIPCOMMENTSFID, MLSTRIPCOMMENTSSTR. Rezaul, 2004 mlstripcommentsfile('mainvsrall.m', 'mainvsralla.m') mlstripcommentsfile('batchrunsgifball.m', 'batchrunsgifballa.m')