extractdata - Extract data from dlarray - MATLAB (original) (raw)
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
.
Examples
Extract Data from dlarray
Create a logical dlarray
with data format 'SS'
.
rng default % For reproducibility dlX = dlarray(rand(4,3) > 0.5,'SS')
dlX = 4(S) x 3(S) logical dlarray
1 1 1 1 0 1 0 0 0 1 1 1
Extract the data from dlX
.
y = 4x3 logical array
1 1 1 1 0 1 0 0 0 1 1 1
Input Arguments
X
— Input dlarray
dlarray
object
Input dlarray
, specified as a dlarray
object.
Example: X = dlarray(randn(50,3),'SC')
Output Arguments
Y
— Data array
single array | double array | logical array | gpuArray
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
- If X contains an implicit permutation because of formatting,Y has that permutation explicitly.
- The output
Y
has no tracing for the computation of derivatives. See Derivative Trace.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Code generation does not support gpuArray
data type.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Usage notes and limitations:
For recommendations and limitations on gpuArray
, see Support for GPU Arrays (GPU Coder).
Version History
Introduced in R2019b