Main Content

getUniqueValues

Get unique values fromfixed.DataGeneratorobject

Description

example

data= getUniqueValues(datagenerator)returns all unique values in the data generated by thefixed.DataGeneratorobject,datagenerator.

Examples

collapse all

In data generated from afixed.DataGenerator对象,可以重复values. Use thegetUniqueValuesfunction to get all of the unique values in the data set.

dataspec = fixed.DataSpecification('fixdt(1,16,13)',...'Intervals', {-1,1})
dataspec = fixed.DataSpecification with properties: DataTypeStr: 'sfix16_En13' Intervals: [-1,1] MandatoryValues:  Complexity: 'real' Dimensions: 1
datagen = fixed.DataGenerator('DataSpecifications', dataspec,...'NumDataPointsLimit', 20); getUniqueValues(datagen)
ans = -1.0000 -0.9999 -0.4999 -0.2500 -0.0624 -0.0313 -0.0039 -0.0021 -0.0005 -0.0002 0 0.0010 0.0018 0.0078 0.0155 0.0157 0.1249 0.1251 0.9999 1.0000 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 13

Input Arguments

collapse all

Inputfixed.DataGeneratorobject to get unique values from.

Output Arguments

collapse all

Unique set of data generated by the inputfixed.DataGeneratorobject, returned as a scalar, vector, or matrix.

Version History

Introduced in R2019b