getUniqueValues
Description
returns all unique values in the data generated by the data
= getUniqueValues(datagenerator
)fixed.DataGenerator
object, datagenerator
.
Examples
Get unique values in data from DataGenerator
object
In data generated from a fixed.DataGenerator
object, there can be repeated values. Use the getUniqueValues
function
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: <empty> 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
datagenerator
— Input fixed.DataGenerator
object
fixed.DataGenerator
object
Input fixed.DataGenerator
object to get unique values from.
Output Arguments
data
— Unique set of values in data
scalar | vector | matrix
Unique set of data generated by the input fixed.DataGenerator
object, returned as a scalar, vector, or matrix.
Version History
Introduced in R2019b
See Also
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
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)