Hi!
I want to calculate a slope of all columns in a timetable. I apply:
fslope = @(x) polyfit(linspace(1,size(x,1),size(x,1)),x,1) % Slope
like this:
varfun(fslope, X)
what i get is a new timetable with the correct # of columns and rows. However, as polyfit(x,y,1) returns 2 value, those output timetable columns contain two 2 values, which are now grouped. How can i remove one of those (keep only the slope, remove the constant of my polyfit)?
Thanks a lot!
Best Answer