Smooth2D: Difference between revisions

From CCN Wiki
Jump to navigation Jump to search
(Created page with "smooth2D is a MATLAB wrapper function that applies the MATLAB smooth() function individually to each column of a 2D matrix (really, I should extend this to a general SmoothND...")
(No difference)

Revision as of 11:04, 17 August 2017

smooth2D is a MATLAB wrapper function that applies the MATLAB smooth() function individually to each column of a 2D matrix (really, I should extend this to a general SmoothND function). The function can be found, as usual, in the ubfs Scripts/Matlab folder. To apply it to a cell array of 2D matrices (e.g., of time series data), use it within cellfun():

smdtM=cellfun(@(x) smooth2D(x, 'span', 6, 'method', 'rloess'), dtM, 'UniformOutput', false);

Check out the help page for the MATLAB smooth() function for more information on the different smoothing methods.