generally, I suggest not using tabs when you want a table aligned. Instead, set the field widths larger:
fprintf('%6.2f %9.3f %7.1f %10.4f %9.3f\n',table')
I got the specific numbersby trial and error, but there is a formula:
- first width only needs to fit that data, so assuming that all data is <1000, we have 3 [digits before decimal] + 1 [decimal] + 2 [digits after decimal] = 6
- remaining fields should also include some padding between columns, so 4 [padding] + 3 [digits before decimal] + 1 [decimal] + 1-4 [digits after decimal] = 8-10