I would like to write data in a text file with an alignment of the text after each column head. At this point, here's what I get:
PROJET RECORDER VERSIONBias RIG001 2.0Bias RIG002 2.0Courseulles (eolien) ENR-002 0.1Monaco ENR-007 3.0
How should I do to align the text after each column head ? I will really appreciate if someone could help me ! Thanks!
NB : Code to process the text file
fid = fopen(fileSave,'w');fprintf(fid,sprintf('%s%25s%25s\n','PROJET','RECORDER','VERSION'));for iData = 1:length(logDataName); fprintf(fid,sprintf('%s%25s%25s\n',logDataName(iData).project,logDataName(iData).recorder,logDataName(iData).version));endfclose(fid);
Best Answer