How do I format data in a table
이전 댓글 표시
I want to print the data in the following code in a table instead of in a column, i.e., I want the headers in the first row and the data in each column under it.
Thanks,
filename = 'E:\My Documents\Maheteme\Test Data\myfile02.txt';
delimiterIn = ' ';
headerlinesIn = 1;
A = importdata(filename,delimiterIn,headerlinesIn);
for k = [1, 2, 3, 4, 5, 6, 7, 8, 9]
disp(A.colheaders{1, k})
disp(A.data(:, k))
disp(' ')
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!