MATLAB: What is the difference between ‘smooth’ and ‘smoothdata’ function

MATLABsmoothsmoothdata

I known that the 'smooth' function deals with response data while the 'smoothdata' function deals with noisy data.
Is there any difference bewteen response data and noisy data?
Are 'smooth' and 'smoothdata' repetitive functions?

Best Answer

These are very similar codes, doing similar things. smooth came eariler. But not everybody has the same toolboxes, nor can you be forced to get all toolboxes. Yet many people will want to do the same things as are found in both codes.
Smooth came out in 2006, smoothdata in 2017. Smoothdata is a little more sophisticated, with more options, as you might expect, since it was introduced many years later. It can work on multidimensional arrays. Smooth seems to be for vectors only. The interface is slightly different between them, but not by that much.
Which one is "better"? Neither, really. Both offer a similar set of methods, though smoothdata is a littler broader in your choices. If you need one of the options in smoothdata, then your choice is made for you. If they both offer the same method, and you want to use that method, then just flip a coin. I'm pretty confident the author made sure the code is valid, by crosstesting the results.
Don't get too hung up on the wording in the documentation. They both do essentially the same thing. It would be more important for you to choose intelligently from the various methods offered as options, as that can significantly impact your results. Different methods can be useful for different kinds of noise, different noise structures, so understanding what choices you make is important.
For example, suppose your noise is in the form of rare but very large outliers? In that case, some sort of median smooth makes a lot of sense. Other smoothing operations (moving mean, Savitsky-Golay, etc.) will get draggd around massively by a rare but significant outlier. Again, it is really important to understand the methods in those tools.
Related Question