gather
Syntax
Description
Examples
Gather waveletScattering
object
Refer to GPU Computing Requirements (Parallel Computing Toolbox) to see what GPUs are supported.
Load the noisy Doppler signal. Create a wavelet scattering network gsf
that you can apply to the data.
load noisdopp
gsf = waveletScattering;
Copy the signal to the GPU.
gnoisdopp = gpuArray(noisdopp);
Obtain the scattering feature matrix for the scattering network gsf
and the data that is on the GPU. Specify the log transformation. Confirm the feature matrix is on the GPU.
gsmat = featureMatrix(gsf,gnoisdopp); isgpuarray(gsmat)
ans = logical
1
Obtain the scaling and wavelet filters used in the scattering network.
gfil = filterbank(gsf)
gfil=3×1 cell array
{1×1 struct}
{1×1 struct}
{1×1 struct}
The first element of gfil
contains the scaling filter used in the computation of the zeroth order scattering coefficients. Subsequent elements of gfil
contain the wavelet filters and scaling filter for the corresponding filter banks of the scattering decomposition. Confirm all the scaling and wavelet filters are on the GPU.
[isgpuarray(gfil{1}.phift) isgpuarray(gfil{2}.phift) isgpuarray(gfil{2}.psift) isgpuarray(gfil{3}.phift) isgpuarray(gfil{3}.psift)]
ans = 5×1 logical array
1
1
1
1
1
Gather the scattering network. Confirm all the filters in the gathered network sf
are in the workspace.
sf = gather(gsf); fil = filterbank(sf); [isgpuarray(fil{1}.phift) isgpuarray(fil{2}.phift) isgpuarray(fil{2}.psift) isgpuarray(fil{3}.phift) isgpuarray(fil{3}.psift)]
ans = 5×1 logical array
0
0
0
0
0
Obtain the scattering feature matrix for the scattering network sf
and the original signal. Specify the log transformation. Confirm the feature matrix is not on the GPU. Confirm the feature matrix is equal to the matrix obtained using the network gsf
.
smat = featureMatrix(sf,noisdopp); isgpuarray(smat)
ans = logical
0
xgsmat = gather(gsmat); max(abs(smat(:)-xgsmat(:)))
ans = 8.8818e-16
Input Arguments
sf
— Wavelet time scattering network
waveletScattering
object
Wavelet time scattering network, specified as a waveletScattering
object.
Extended Capabilities
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced in R2023a
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)