How to extract multiple cfit or fit values into one table
Show older comments
Dear all,
So I have a 31x 19 matrix data and I had to fit the first column data (31X1) and the rest of all the 18 columns (31x18).
I wrote a simple if function to do this but my challenge now is about how to extract each fit coefficients (f) including confidence intervals into one Table. I already used coeffvalues but only returns my last f as the ans
Mycode is a follows
r = randi([0, 100], 31,19)
b = (r(:,1));b2=b(:,2:end);
for i= 1:size(b2,2)
% [f, gof_info] = fit(b1,b(:,2),'power1');
f{i}= fit(b, b2(:,i),'power1')
%f_values= coeffvalues(f{i})
end
Your help will be deeply appreciated.
Thanks
E
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!