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™.
The gather
function
fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray
(Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced in R2023a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)