我编写了以下程序来创建表combt。我正在尝试将行名称添加到此表中,但没有运气。我想添加一个包含行名的新列,每行按顺序命名,即(['Row' num2str(j)])
%% Create tables.
combt = [];
%% Loop.
for i = [224:231, 271:281];
j = sprintf('%04d', i)
%% Name the fit results sequentially.
comb.(['comb' j]) = cfit(fitresult);
%% Export combined variables to table.
combt = [combt;comb.(['comb' j])];
end
%% Name the columns.
final = dataset({combt 'a','b','c','d','wa','wb','wc','wd','xa','xb','xc','xd','y0','rsquare'});
当前表如下所示:
我需要它看起来像这样(行名可以通过 实现(['Row' num2str(j)])
):