extractdata

Extract data from dlarray

Description

example

y = extractdata(dlX) returns the data in the dlarray dlX. The output y has the same data type as the data in dlX and is unlabeled

Examples

collapse all

Create a logical dlarray labeled '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 = extractdata(dlX)
y = 4x3 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: dlX = dlarray(randn(50,3),'SC')

Output Arguments

collapse all

Data array, returned as a single, double, or logical array, or as a gpuArray of one of these array types. The output y has the same data type as the underlying data type in dlX. The output y is unlabeled.

Tips

  • If dlX contains an implicit permutation because of labeling, y has that permutation explicitly.

  • The output y has no tracing for the computation of derivatives. See Derivative Trace.

See Also

| (Parallel Computing Toolbox)

Introduced in R2019b