saving to cell2mat without overwriting

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

 Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Productos

Versión

R2018a

Preguntada:

EK
el 5 de Dic. de 2019

Comentada:

EK
el 5 de Dic. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by