主要内容

getAsDatastore

类:万博1manbetxSimulink.SimulationData.DatasetRef
包:万博1manbetxSimulink.SimulationData

得到matlab.io.datastore。SimulationDatastorerepresentation of element from referenced Dataset object

语法

元素= Simuli万博1manbetxnk.SimulationData.DatasetRef.getAsDatastore (datasetref_elements)

描述

元素= Simuli万博1manbetxnk.SimulationData.DatasetRef.getAsDatastore (datasetref_elements)返回一个matlab.io.datastore.SimulationDatastore表示一个元素或集合元素的引用数据集,基于指数名称,或者块元素的路径。

你可以代表一个数据集元素作为matlab.io.datastore.SimulationDatastore对象如果元素放置到MAT-file使用这两种方法:

  • 日志数据集格式的数据持久存储(MAT-file)。

  • 元素到一个地方万博1manbetxSimulink.SimulationData.Dataset对象并保存数据集反对v7.3 MAT-file。

SimulationDatastore表示为一个数据集元素创建一个SimulationDatastore对象字段的值的元素。的SimulationDatastore表示支持的数据流万博1manbetx元素的属性到其他模拟或MATLAB®

请注意

你不能使用创建一个SimulationDatastore数据集这些类型的数据元素,包含:

  • 数组

您可以使用SimulationDatastore对象:

  • 是指记录模拟MAT-file存储在磁盘上的数据。

  • 指定流从磁盘增量模拟信号。

  • 大数据分析使用MATLAB函数提供依据。

输入参数

全部展开

元素的引用数据集MAT-file,指定为一个索引,名称(如特征向量),或块路径(作为特征向量。

输出参数

全部展开

元素访问使用SimulationDatastore对象,作为一个返回matlab.io.datastore.SimulationDatastore对象或一个万博1manbetxSimulink.Signal,万博1manbetxSimulink.State,或类似的对象的数据使用一个matlab.io.datastore.SimulationDatastore对象。

例子

全部展开

测井信号数据持久存储(选择日志数据集的数据文件配置参数)和模拟模型。

创建一个DatasetRef日志记录的信号数据集数据(logsout)out.matMAT-file。

sigLogRef = 万博1manbetxSimulink.SimulationData.DatasetRef (“out.mat”,“logsout”);firstSig = sigLogRef.getAsDatastore (1)
firstSig = 万博1manbetxSimulink.SimulationData。信号包:仿真软件。万博1manbetx模拟Data Properties: Name: 'x1' PropagatedName: '' BlockPath: [1x1 Simulink.SimulationData.BlockPath] PortType: 'outport' PortIndex: 1 Values: [1×1 matlab.io.datastore.SimulationDatastore]

加载数据到另一个模型。这种方法流信号的值x1另一个模拟。

ds = 万博1manbetxSimulink.SimulationData.Dataset;ds {1} = sigLogRef {1};sim卡(“other_model”,“ExternalInput”,“死刑”);

替代

简化使用索引,您可以使用花括号({})获得的语法SimulationDatastore对象DatasetRef对象的信号值。使用要求和结果是一样的getAsDatastore。例如,如果日志信号数据持久存储(选择日志数据集的数据文件配置参数)和模拟模型。

sigLogRef = 万博1manbetxSimulink.SimulationData.DatasetRef (“out.mat”,“logsout”);firstSig = sigLogRef {1}
ans = 万博1manbetxSimulink.SimulationData。信号包:仿真软件。万博1manbetx模拟Data Properties: Name: 'x1' PropagatedName: '' BlockPath: [1x1 Simulink.SimulationData.BlockPath] PortType: 'outport' PortIndex: 1 Values: [1×1 matlab.io.datastore.SimulationDatastore]
介绍了R2017a