次のプログラムを作成して、テーブル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)])
):