Hi,
here some basic code I use to export a FAST.out file with addition of post-processing calculated channel
in MCrunch.m : add the following lines after the call to ReadManyFiles
DoExportCC = 1;
if ( DoExportCC )
WriteManyFiles( FileList, TitleLine, NamesLine, UnitsLine, FirstDataLine);
end
create the function WriteManyFiles.m with the following code (this by default save the data in an output file with extension .outp )
function WriteManyFiles( FileList, TitleLine, NamesLine, UnitsLine, FirstDataLine )
%WRITEMANYFILES Summary of this function goes here
% Detailed explanation goes here
global FileInfo
% Estimate the number of lines in all the files.
NumFiles = int16( size( FileList, 1 ) );
for File=1:NumFiles
FileNameOut = strrep(FileList{File},'.out','.outp');
Data = FileInfo.Time(FileInfo.StartLine(File):FileInfo.StartLine(File)+FileInfo.NumLines(File)-1,:);
fid = fopen(FileNameOut,'w');
fprintf(fid,'%s',FileInfo.Title{File});
for Wi=1:NamesLine
fprintf(fid,'\n');
end
% Print Names
for Ni=1:size( FileInfo.Names,2)
fprintf(fid,'%8s\t',FileInfo.Names{Ni});
end
fprintf(fid,'\n');
% Print Units
for Ui=1:size( FileInfo.Units,2)
fprintf(fid,'%8s\t',FileInfo.Units{Ui});
end
fprintf(fid,'\n');
fclose(fid);
dlmwrite(FileNameOut, Data, '-append', 'delimiter', '\t', 'precision', '%1.3e');
end
end
for sure could be optimized, but yet is something
cheers
Stefano