How do I make a table using fprintf?
14 ビュー (過去 30 日間)
古いコメントを表示
I need to make a 13x2 table from data in Matlab with titles. I wasn't shown how to do this and I can't find help online.
0 件のコメント
回答 (1 件)
Star Strider
2014 年 10 月 16 日
This is one way:
x = randi(10,13,2); % Create Data
fprintf(1, ' Col#1 Col#2\n') % Column Titles
fprintf(1, '\t\t%2d\t\t%2d\n', x') % Write Rows
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!