필터 지우기
필터 지우기

Trying to add borders to a table to save as .txt

조회 수: 1 (최근 30일)
Mike
Mike 2018년 6월 27일
So i have 3 lists, which I am trying to make into a table. Initially I just used T=table(x,y,z), but this was not aligned and had no borders. So now I am trying to set up the table first with borders, then append the lists to the table. I am getting this error message and I have no idea to solve it, and am struggling to find any other way to make a table with borders.
Thanks in advance
"Error using append (line 38) Wrong number of input arguments for obsolete matrix-based syntax."
if true
function example()
import mlreportgen.dom.*;
table = Table(3);
table.Style = {Border('inset','red','3px'), ...
ColSep('single','green','1px'), ...
RowSep('single','green','1px')};
table.Width = '50%';
x={'a';'b';'c'}
y=[1;2;3]
z=[4;5;6]
%T=table(x,y,z)
%append(T,table)
append({x,y,z},table)
%writetable(T,'mydata.txt')
end
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by