主要内容

fixed.datagenerator.

创建值集并生成数据

描述

使用固定的。DataSpecificationfixed.datagenerator.对象来生成模拟输入,以测试您的设计的全部操作范围。

创建

描述

例子

数据=固定。DataGenerator (名称,值创建一个DataGenerator对象,其附加属性指定为名称,值对论点。

属性

全部展开

要生成的数据的属性,指定为a固定的。DataSpecification对象。

指定单元格数组DataSpecification对象产生一个DataGenerator用于输入到具有相同输入数量的系统的对象,并且在与单元数组中的元素相同的顺序。

生成数据中的最大数据点数,指定为整值标量。有关更多信息,请参见getNumDataPointsInfo

数据类型:||int8|int16|INT32.|int64|uint8|uint16|uint32|uint64

对象的功能

getUniqueValues fixed.datagenerator.对象
getNumDataPointsInfo 获取关于生成数据中的数据点数量的信息
outputAllData 得到的数据fixed.datagenerator.对象

例子

全部折叠

创建一个DataGenerator对象,通过指定DataSpecification对象。

创建DataSpecification对象,其间隔为 - 2 π 2 π 具有数据类型的

dataspec = fixed.dataSpecification(“单一”“间隔”,{-2 * pi,2 * pi})
dataspec =固定。带有属性的数据规格:datatype: 'single'间隔:[-6.2832,6.2832]ExcludeDenormals: false exudnegativezero: false MandatoryValues: <空>复杂度:'real'维度:1

使用DataSpecification对象创建一个DataGenerator对象。将生成数据中的数据点数限制为5000点。您可以在构造函数中指定这些属性作为名称 - 值对DataGenerator对象。

datagen =固定。DataGenerator ('DataSpecifications'dataspec,'numdatapointslimit',5000)
datagen =固定。DataGeneratorwith properties: DataSpecifications: {[1x1 fixed.DataSpecification]} NumDataPointsLimit: 5000

使用outputAllData函数查看生成的数据。

MyData = OutputAllData(Datagen)
mydata =1x262单行矢量-6.2832 -6.2832 -4.0000 -4.0000 -4.0000 -2.0000 -2.0000 -2.0000 -1.0000 -1.0000 -1.0000 -0.5000 -0.5000 -0.5000 -0.2500 -0.2500 -0.2500 -0.1250 -0.1250 -0.1250 -0.0625 -0.0625 -0.0625 -0.0313 -0.0312 -0.0156 -0.0078 -0.0078 -0.0078 -0.0039 -0.0039 -0.0039 -0.0020 -0.0020 -0.0001 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000-0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000

算法

全部展开

介绍了R2019b