I wish to write the output data in a text file of my program like that:
sr. a b c
1 100.00 252.000 32.00
11 18.20 20.222 1.00
etc.
the data should be aligned with the decimal irrespective of the digits before the decimal. And there will be no change in the position if the digits before the decimal increased, e.g.
sr. a b c
1 100.00 252.000 32.00
11 18.20 120.222 1.00
Suggest me any convenient way to do this.
Best Regards
ALi
I am also using fprintf(). I am writing like that:
fprintf('\t\t\t %5.2f', a)
How to specify field width appropriately.