outputAllData
説明
は、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
オブジェクトで指定された型をもつ配列でデータを返します。
timeseries
オブジェクトとしてのデータの取得
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]
入力引数
datagenerator
— データの取得元となるオブジェクト
fixed.DataGenerator
オブジェクト
データの取得元となるオブジェクト。fixed.DataGenerator
オブジェクトとして指定します。
format
— データが返される形式
'array'
(既定値) | 'timeseries'
| 'dataset'
データが返される形式。'array'
、'timeseries'
、または 'dataset'
のいずれかとして指定します。
'dataset'
を指定すると、Simulink.SimulationData.Dataset
オブジェクトが返されます。'timeseries'
を指定すると、timeseries
オブジェクトが返されます。
例: data = outputAllData(datagen, 'timeseries');
データ型: char
出力引数
data
— DataGenerator
オブジェクトからのデータ
スカラー | ベクトル | 行列 | timeseries
オブジェクト
DataGenerator
オブジェクトからのデータ。スカラー、ベクトル、行列または timeseries
オブジェクトとして返されます。
バージョン履歴
R2019b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)