extractdata - Extract data from dlarray - MATLAB (original) (raw)

Main Content

Extract data from dlarray

Syntax

Description

The extractdata function extracts the data from a dlarray object.

[Y](#mw%5F24b9b23b-a6da-4fb3-99da-41f6039f2b97) = extractdata([X](#mw%5Fb362e946-e132-4b79-902a-81a3f6d20cb6)) returns the data in the dlarray X. The output Y has the same data type as the underlying data in X.

example

Examples

collapse all

Create a logical dlarray with data format 'SS'.

rng default % For reproducibility dlX = dlarray(rand(4,3) > 0.5,'SS')

dlX = 4(S) × 3(S) logical dlarray

1 1 1 1 0 1 0 0 0 1 1 1

Extract the data from dlX.

y = 4×3 logical array

1 1 1 1 0 1 0 0 0 1 1 1

Input Arguments

collapse all

Input dlarray, specified as a dlarray object.

Example: X = dlarray(randn(50,3),'SC')

Output Arguments

collapse all

Data array, returned as a single, double, or logical array, or as agpuArray of one of these array types. The outputY has the same data type as the underlying data type inX.

Tips

Extended Capabilities

expand all

Usage notes and limitations:

Code generation does not support gpuArray data type.

Usage notes and limitations:

For recommendations and limitations on gpuArray, see Support for GPU Arrays (GPU Coder).

Version History

Introduced in R2019b