I am writing an output file to MATLAB as part of a report. I need to center justify the title which is having a fixed column width.
If I use the below code it becomes right-justified.
fprintf(fileID,'%50s \r\n', 'Balance Sheet')
And if I use the below code it becomes left-justified.
fprintf(fileID,'%-50s \r\n', 'Balance Sheet')
But how do I center-justify?