saving to cell2mat without overwriting

1 次查看(过去 30 天)
I am fitting data (each column ) to linear function in a loop
I would like to save output result (gof) to a matrix , each loop different column without overwritin.
Can anyone help?
x = B(:,2)
for i=3: length(B)
y = B(:,i)
[fitresult, gof] = createFit(x, y)
A=cell2mat(struct2cell(gof))
end

采纳的回答

JESUS DAVID ARIZA ROYETH
x = B(:,2)
A=[];
for i=3: length(B)
y = B(:,i)
[fitresult, gof] = createFit(x, y)
A=[A cell2mat(struct2cell(gof))]
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by