Whereas standard deviation and variance are measures of absolute variance, the coefficient of variation is a measure of relative variance. This is generally useful to compare several data sets. It can also be used as a simple quality indicator. The definition used here is ratio of standard deviation to mean value expressed as percentage. For more information on descriptive statistics, check out the online documentation for the Statistics Toolbox at http://www.mathworks.com/help/stats/index.html?searchHighlight=Statistics+Toolbox.
This is just a one-line utility but I use it often because it's convenient - saves typing.
Robert Bemis (2023). RelVar (https://www.mathworks.com/matlabcentral/fileexchange/3278-relvar), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!