Measurements and Statistics
You can use DSP System Toolbox™ blocks and System objects to measure the moving statistics and stationary statistics of signals in MATLAB® and Simulink®. Moving statistics refer to the statistics of streaming signals that change with time. In the sliding window method for computing moving statistics, a window of specified length moves over the data sample by sample as the new data comes in. The objects and blocks compute the statistics of the data within this window. The exponential weighting method applies a set of weights to the data samples and processes the weighted data. These weights are computed recursively based on the age of the data. For stationary statistics, the blocks and objects compute the statistics of all the data that is available in a batch.
Objects
Blocks
Topics
Moving Statistics
- What Are Moving Statistics?
Learn how moving statistics are calculated. - Sliding Window Method and Exponential Weighting Method
Learn the differences between the sliding window method and exponential weighting method. - How Is a Moving Average Filter Different from an FIR Filter?
Moving average filter is a special case of the FIR filter. - Measure Statistics of Streaming Signals
Compute the moving average of streaming signals using MATLAB functions and System objects. - Compute Moving Average of Noisy Step Signal
Compare the sliding window averaging method and the exponentially weighted averaging method in Simulink using the Moving Average block. - Compute Moving RMS of Noisy Step Signal
Compute moving RMS using both the sliding window method and the exponential weighting method. - Compute Moving Standard Deviation of Noisy Square Wave Signal
Compare the sliding window standard deviation method and the exponentially weighted standard deviation method in Simulink using the Moving Standard Deviation block. - Compute Moving Variance of Noisy Square Wave Signal
Compare the sliding window variance method and the exponentially weighted variance method in Simulink using the Moving Variance block.
Stationary Statistics
- Compute the Mean
Simulink model example to compute the mean using the Mean block. - Compute Mean Using Sliding Window
Model a sliding window using the Buffer block. The Mean block use this window to compute the mean. - Compute the Running Mean
Simulink model example to compute the running mean using the Mean block. - Compute the Maximum
Simulink model example to compute the maximum using the Maximum block. - Compute the Running Maximum
Simulink model example to compute the running maximum using the Maximum block. - Compute the Minimum
Simulink model example to compute the minimum using the Minimum block. - Compute the Running Minimum
Simulink model example to compute the running minimum using the Minimum block. - Compute RMS of Noisy Step Signal
Use the RMS block to compute the RMS of a noisy square wave signal. - Compute the Histogram of Real and Complex Data
Simulink model example that explains how the histogram bin boundaries are calculated based on the input. - Compute the Standard Deviation
Use the Standard Deviation block to compute the standard deviation. - Compute the Running Standard Deviation
Use the Standard Deviation block to compute the running standard deviation. - Compute the Variance
Use the Variance block to compute the variance.
Power Measurements
- Compute Power Measurements of Voltage Signal in Simulink
Compute average power, peak power, and peak-to-average power ratio of voltage signal. - Compute CCDF Measurements of Voltage Signal in Simulink
Compute relative power and probability, and plot the CCDF curve in Array Plot.
Applications
- Remove High-Frequency Noise from Gyroscope Data
Remove high-frequency noise using a median filter. - Energy Detection in the Time Domain
Detect the event when the signal energy crosses a particular threshold value.
Variable-Size Signal Support
- Variable-Size Signal Support DSP System Objects
List of System objects that support variable-sized signals in DSP System Toolbox.