MATLAB: Lowess smoothing has 49,226 calls , taking forever, anyway to speed up

curve fittingCurve Fitting Toolboxlowesssmoothsmoothing

I have an array that is 24613 cells of data and I am trying to run:
if true
Smooth=smooth(GraphTime, Data(:,1),800,'lowess');
end
The problem is lowess looks at every cell twice for the comparison and smoothing, so thats 49226 calls which according to the profiler takes 117 seconds to complete this and I am doing it twice for separate data sets in each run! How can I shrink this time?

Best Answer

I found the problem. In my smooth call: I am doing a double smoothign for both the (x,y) variables. so it is comparing all of them bewteen graphtime and data. if i delete graphtime it looks about the same and is 0.6 seconds fast. basically do just this:
Smooth=smooth(Data(:,1),800,'lowess');