Info
此问题已关闭。 请重新打开它进行编辑或回答。
I cant get my column headings to line up with corresponding data. here is my code...
1 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
回答(1 个)
Walter Roberson
2014-2-5
Use fprintf() instead of disp(). Use format elements that have width counts. For example,
fprintf('%14.2f %12.2f ...', table.');
1 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!