Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

I cant get my column headings to line up with corresponding data. here is my code...

1 Ansicht (letzte 30 Tage)
Joseph
Joseph am 5 Feb. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
They are two word headings and if it was possible to wrap text it might help...any ideas?
table=[M' Iy' MP' TP' TI'];
disp('')
disp( 'Months Annual Interest(%) Monthly Payment($) Total Payment($) Total Interest($)')
disp(table)

Antworten (1)

Walter Roberson
Walter Roberson am 5 Feb. 2014
Use fprintf() instead of disp(). Use format elements that have width counts. For example,
fprintf('%14.2f %12.2f ...', table.');

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by