Hi. I have a matrix and I have been using the following syntax to fit some data from the matrix z.
[~,~,output] = fit(t,z(:,32),'poly3');
The output residuals get stored as output.residuals in the workspace and have to be extracted.
I wish to do the fitting for all the columns in the matrix and use the residuals for all columns in a loop. I wish to put the fitting syntax directly in the loop and not extract output residuals since the loop doesn't run.