How do I make a table using fprintf?
조회 수: 13 (최근 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!