# Descriptive Statistics

Peaks, RMS level, peak-to-peak amplitude, crest factor, dynamic time warping, CUSUM control chart, edit distance

Use `findpeaks` to locate the local maxima of a signal and sort the peaks by height, width, or prominence. Determine the crest factor of a signal using the `peak2rms` function and compute common descriptive statistics like maxima, minima, standard deviations, and RMS levels. Search for signals of interest in larger data sets and align signals in time. Locate points where a signal changes abruptly or drifts beyond a target range. Label signals for analysis or machine and deep learning applications.

## Apps

 Signal Analyzer Visualize and compare multiple signals and spectra Signal Labeler Label signal attributes, regions, and points of interest, and extract features

## Functions

expand all

 `cummax` Cumulative maximum `cummin` Cumulative minimum `envelope` Signal envelope `max` Maximum elements of array `mean` Average or mean value of array `meanfreq` Mean frequency `medfreq` Median frequency `median` Median value of array `min` Minimum elements of array `movmad` Moving median absolute deviation `movmedian` Moving median `peak2peak` Maximum-to-minimum difference `peak2rms` Peak-magnitude-to-RMS ratio `rssq` Root-sum-of-squares level `seqperiod` Compute period of sequence `std` Standard deviation `var` Variance
 `alignsignals` Align two signals by delaying earliest signal `cusum` Detect small changes in mean using cumulative sum `dtw` Distance between signals using dynamic time warping `edr` Edit distance on real signals `findchangepts` Find abrupt changes in signal `finddelay` Estimate delay(s) between signals `findpeaks` Find local maxima `findsignal` Find signal location using similarity search `signalFrequencyFeatureExtractor` Streamline signal frequency feature extraction (Since R2021b) `signalTimeFeatureExtractor` Streamline signal time feature extraction (Since R2021a) `signalTimeFrequencyFeatureExtractor` Streamline signal time-frequency feature extraction (Since R2024a) `zerocrossrate` Zero-crossing rate (Since R2021b)
 `labeledSignalSet` Create labeled signal set `signalLabelDefinition` Create signal label definition `countlabels` Count number of unique labels (Since R2021a) `filenames2labels` Get list of labels from filenames (Since R2022b) `folders2labels` Get list of labels from folder names (Since R2021a) `splitlabels` Find indices to split labels according to specified proportions (Since R2021a) `framelbl` Partition label sequence into frames (Since R2024a) `framesig` Partition signal into frames (Since R2024a) `signalMask` Modify and convert signal masks and extract signal regions of interest (Since R2020b) `binmask2sigroi` Convert binary mask to matrix of ROI limits (Since R2020b) `extendsigroi` Extend signal regions of interest to left and right (Since R2020b) `extractsigroi` Extract signal regions of interest (Since R2020b) `mergesigroi` Merge signal regions of interest (Since R2020b) `removesigroi` Remove signal regions of interest (Since R2020b) `shortensigroi` Shorten signal regions of interest from left and right (Since R2020b) `sigroi2binmask` Convert matrix of ROI limits to binary mask (Since R2020b) `sigrangebinmask` Label signal samples with values within a specified range (Since R2023a)