Main Content

outputAllData

fixed.DataGenerator オブジェクトからのデータの取得

R2019b 以降

説明

data = outputAllData(datagenerator) は、fixed.DataGenerator オブジェクト datagenerator で生成されたデータを返します。

data = outputAllData(datagenerator, format) は、fixed.DataGenerator オブジェクト datagenerator で生成されたデータを format で指定された形式で返します。

すべて折りたたむ

fixed.DataGenerator オブジェクトからデータを取得します。値の配列として返します。

dataspec = fixed.DataSpecification('int8', 'Intervals', {-1,1});
datagen = fixed.DataGenerator('DataSpecifications', dataspec,...
 'NumDataPointsLimit', 20)
datagen = 

  fixed.DataGenerator with properties:

    DataSpecifications: {[1×1 fixed.DataSpecification]}
    NumDataPointsLimit: 20

関数 outputAllData を使用して DataGenerator オブジェクト内のデータにアクセスします。

data = outputAllData(datagen)
data =

  1×3 int8 row vector

   -1    0    1

関数は fixed.DataSpecification オブジェクトで指定された型をもつ配列でデータを返します。

fixed.DataGenerator オブジェクトからデータを取得します。timeseries オブジェクトとして返されます。

dataspec = fixed.DataSpecification('int8', 'Intervals', {-1,1});
datagen = fixed.DataGenerator('DataSpecifications', dataspec,...
 'NumDataPointsLimit', 2000)
datagen = 

  fixed.DataGenerator with properties:

    DataSpecifications: {[1×1 fixed.DataSpecification]}
    NumDataPointsLimit: 20000

timeseries オブジェクトを取得する出力型の形式を指定します。

data = outputAllData(datagen, 'timeseries')
  timeseries

  Common Properties:
            Name: 'unnamed'
            Time: [3x1 double]
        TimeInfo: [1x1 tsdata.timemetadata]
            Data: [3x1 int8]
        DataInfo: [1x1 tsdata.datametadata]

入力引数

すべて折りたたむ

データの取得元となるオブジェクト。fixed.DataGenerator オブジェクトとして指定します。

データが返される形式。'array''timeseries'、または 'dataset' のいずれかとして指定します。

'dataset' を指定すると、Simulink.SimulationData.Dataset オブジェクトが返されます。'timeseries' を指定すると、timeseries オブジェクトが返されます。

例: data = outputAllData(datagen, 'timeseries');

データ型: char

出力引数

すべて折りたたむ

DataGenerator オブジェクトからのデータ。スカラー、ベクトル、行列または timeseries オブジェクトとして返されます。

バージョン履歴

R2019b で導入