bandpower
The power of the frequency band.
| Library |
|
Syntax
Function call
-
p = bandpower(pxx,f,"psd")— returns the average power calculated by integrating the estimatepxxspectral power density (SPM). The integral is approximated by the rectangle method. Input argumentf— the vector of frequencies corresponding to the estimates of the SPM inpxx. Parameter"psd"indicates that the input data is an estimate of the SPM, not time series data.
-
p = bandpower(pxx,f,freqRange,"psd")— returns the average power in the frequency rangefreqRange. If the frequencies infreqRangedo not match the values inf, the closest values are used. The average power is calculated by integrating the estimatepxxspectral power density (SPM). The integral is approximated by the rectangle method. Parameter"psd"indicates that the input data is an estimate of the SPM, not time series data.
Arguments
Input arguments
# x — time series input data
+
vector | the matrix
Details
Time series input data, specified as a row vector, column vector, or matrix. If x is a matrix, then its columns are treated as independent channels.
| Типы данных |
|
| Support for complex numbers |
Yes |
#
Fs —
sampling
rate
1 (default) | positive scalar
Details
The sampling rate of the input data of the time series, set as a positive scalar.
| Типы данных |
|
# freqRange — frequency range for calculating the power of the frequency band
+
two-element real vector-row or column
Details
The frequency range for calculating the frequency band power, specified as a two-element real row vector or column vector. If the input signal is x contains counts, argument freqRange It must be in the following intervals:
| Типы данных |
|
# pxx — SPM ratings
+
column vector | the matrix
Details
One-sided or two-sided estimates of the SPM, defined as a real-valued column vector or matrix with non-negative elements.
The power spectral density should be expressed in linear units, not in decibels. Use the function db2pow to convert decibel values to power values.
| Типы данных |
|
Output arguments
# p is the average power of the frequency band
+
a non-negative scalar
Details
The average bandwidth power returned as a non-negative scalar.
| Типы данных |
|
Algorithms
To determine the power of the frequency band, the function bandpower calculates an estimate of the power spectrum of the periodogram using the Hamming window.
The same frequency band power value bPow in the frequency range [fMin fMax] can be obtained from the signal x with sampling rate Fs in three ways.
Straight from the signal |
|
From the periodogram of the signal |
|
From the estimation of the spectral power (SPM Welch) of the signal |
|
Because the function bandpower It uses an intermediate representation to convert the input signal from the time domain to the frequency domain. The returned bandwidth power may vary depending on the signal conversion method, the number of DFT points, and the window size.
|