numCoefficients
Description
returns the number of scattering coefficients for each scattering path in the wavelet time
scattering network ncf
= numCoefficients(sf
)sf
. The number of scattering coefficients depends on
the values of the
SignalLength,
InvarianceScale, and
OversamplingFactor properties of
sf
.
Examples
Oversample 1-D Wavelet Scattering Transform
This example shows how to oversample a 1-D wavelet scattering transform.
Load an ECG signal sampled at 180 Hz, and create a wavelet time scattering network to process the signal. To perform a critically downsampled wavelet scattering transform, do not change the value of the OversamplingFactor
property in sf
. Return the number of scattering coefficients for the scattering network.
load wecg Fs = 180; sf = waveletScattering('SignalLength',numel(wecg),'SamplingFrequency',Fs); ncf = numCoefficients(sf)
ncf = 8
Return the 1-D wavelet scattering transform of wecg
, and plot the zeroth-order scattering coefficients. Confirm the number of zeroth-order scattering coefficients is equal to ncf
.
s = scatteringTransform(sf,wecg); display(['Number of zeroth-order scattering coefficients: ',... num2str(numel(s{1}.signals{1}))])
Number of zeroth-order scattering coefficients: 8
plot(s{1}.signals{1},'x-') grid on axis tight title('Zeroth-Order Scattering Coefficients')
To oversample the scattering coefficients by a factor of 2, set the OversamplingFactor
property of sf
equal to 1 (because ). Return the number of scattering coefficients for the edited network. Confirm the number of scattering coefficients has doubled.
sf.OversamplingFactor = 1; ncf = numCoefficients(sf)
ncf = 16
Return the wavelet scattering transform of wecg
using the edited network, and plot the zeroth-order scattering coefficients. Since the number of coefficients in the critically sampled transform is equal to 8, confirm that the number of zeroth-order coefficients in the oversampled transform is equal to 16.
s = scatteringTransform(sf,wecg); figure plot(s{1}.signals{1},'x-') grid on axis tight title('Zeroth-Order Scattering Coefficients')
Input Arguments
sf
— Wavelet time scattering network
waveletScattering
object
Wavelet time scattering network, specified as a waveletScattering
object.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2019a
See Also
Abrir ejemplo
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)