Main Content

numCoefficients

Number of wavelet scattering coefficients

Description

example

ncf= numCoefficients(sf)returns the number of scattering coefficients for each scattering path in the wavelet time scattering networksf. The number of scattering coefficients depends on the values of theSignalLength,InvarianceScale, andOversamplingFactorproperties ofsf.

Examples

collapse all

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 theOversamplingFactorproperty insf. Return the number of scattering coefficients for the scattering network.

loadwecgFs = 180; sf = waveletScattering('SignalLength',numel(wecg),'SamplingFrequency',Fs); ncf = numCoefficients(sf)
ncf = 8

Return the 1-D wavelet scattering transform ofwecg, and plot the zeroth-order scattering coefficients. Confirm the number of zeroth-order scattering coefficients is equal toncf.

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-') gridonaxistighttitle('Zeroth-Order Scattering Coefficients')

Figure contains an axes object. The axes object with title Zeroth-Order Scattering Coefficients contains an object of type line.

To oversample the scattering coefficients by a factor of 2, set theOversamplingFactorproperty ofsfequal to 1 (because log 2 2 = 1 ). 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 ofwecgusing 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-') gridonaxistighttitle('Zeroth-Order Scattering Coefficients')

Figure contains an axes object. The axes object with title Zeroth-Order Scattering Coefficients contains an object of type line.

Input Arguments

collapse all

Wavelet time scattering network, specified as awaveletScatteringobject.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

版本历史

Introduced in R2019a