读数据采集工具箱(。daq
) file
data = daqread('fileName')
[数据,时间] = daqread(。。。)
[数据,时间,戒指] = daqread(...)
[数据,时间,戒指,事件] = daqread(...)
[data,time,abstime,events,daqinfo] = daqread(...)
data = daqRead(...,,'Param1'
, Val1,...)
Daqinfo= daqread('filename','info')
data = daqread('fileName')
reads all the data from the Data Acquisition Toolbox™ (。daq
) file specified byfilename
。daqread
returns数据
, anm-经过-n数据矩阵,其中mis the number of samples andn是频道的数量。如果数据
includes data from multiple triggers, the data from each trigger is separated by aNaN
。如果您设置输出格式
property totscollection
,daqread
返回时间系列集合对象。请参阅下面的详细信息。
[数据,时间] = daqread(。。。)
返回时间/价值对。time
is anm-经过-1 vector, the same length as数据
, that contains the relative time for each sample. Relative time is measured with respect to the first trigger that occurs.
[数据,时间,戒指] = daqread(...)
returns the absolute time of the first trigger.abstime
is returned as a钟
向量。
[数据,时间,戒指,事件] = daqread(...)
returns a log of events.events
是包含事件信息的结构。如果指定样品
,Time
, orTriggers
参数(见下文),事件结构仅包含指定的事件。
[data,time,abstime,events,daqinfo] = daqread(...)
返回结构,Daqinfo
, that contains two fields:ObjInfo
和hwinfo
。ObjInfo
是包含属性名称/属性价值对的结构和hwinfo
是包含硬件信息的结构。整个事件日志返回到daqinfo.objinfo.eventlog
。
data = daqRead(...,,
specifies the amount of data returned and the format of the data, using the following parameters.'Param1'
, Val1,...)
Parameter |
Description |
---|---|
|
指定样品范围。 |
|
Specify the relative time range. |
|
Specify the trigger range. |
|
指定通道范围。频道名称可以指定为单元格数组。 |
|
Specify the data format as |
|
Specify the time format as |
|
Specify the output format as |
这样品
,Time
, 和Triggers
properties are mutually exclusive; that is, you can specify only one of them in a function call.
Daqinfo= daqread('filename','info')
从文件中返回元数据Daqinfo
结构,也不会引起从文件中读取数据的开销。这Daqinfo
structure contains two fields:
Daqinfo。ObjInfo
a structure containing parameter/value pairs for the data acquisition object used to create the file,filename
。Note: The用户数据
property value is not restored.
Daqinfo。hwinfo
a structure containing hardware information. The entire event log is returned todaqinfo.objinfo.eventlog
。
这个例子展示了如何读取数据,得救了to the log filedata.daq
in an earlier release. This logging was achieved by specifying the logging properties of ananaloginput
object as described inanaloginput
。你用daqread
to retrieve the data and other acquisition related information.
读all the sample-time pairs fromdata.daq
:
[数据,时间] = daqread('data.daq');
读samples 500 to 1000 for all channels fromdata.daq
:
data = daqRead('data.daq','Samples',[500 1000]);
从文件中仅读取频道指数2、4和7的1000至2000的样品。data.daq
:
data = daqRead('data.daq','Samples',[1000 2000],。。。'Channels',[2 4 7],“ dataformat','native');
读only the data that represents the first and second triggers on all channels from the filedata.daq
:
[数据,时间] = daqread('data.daq','Triggers', [1 2]);
从data.daq
:
Daqinfo= daqread('data.daq','信息'); chaninfo = daqinfo.ObjInfo.Channel;
Obtain a list of event types and event data contained indata.daq
:
Daqinfo= daqread('data.daq','信息'); events = daqinfo.ObjInfo.EventLog; event_type = {events.Type}; event_data = {events.Data};
读all the data from the filedata.daq
和return it as a time series collection object:
data = daqRead('data.daq','OutputFormat',“ tscollection');
如果读取来自多个触发器的数据,则会通过发出的触发器数量增加结果数据阵列的大小,因为每个触发器都被一个触发器分开NaN
。
ObjInfo.EventLog
always contains the entire event log regardless of the value specified by样品
,Time
, orTriggers
。
这用户数据
property value is not restored when you return device object (ObjInfo
) information.
什么时候reading a。daq
file, thedaqread
function does not return property values that were specified as a cell array.
什么时候输出格式
被设定为tscollection
,daqread
返回时间系列集合对象。此时间序列集合对象包含文件中每个通道的绝对时间序列对象。以下描述了如何daqread
sets some of the properties of the time series collection object and the time series objects.
这time
property of the time series collection object is set to the value of theInitialTriggerTime
property specified in the file.
这name
property of each time series object is set to the value of theName
property of a channel in the file. If this name cannot be used as a time series object name,daqread
设置name to'渠道'
与HwChannel
附加频道的属性。
价值单位
property of the time series object depends on the value of theDataFormat
parameter. If theDataFormat
参数设置为'double'
,daqread
设置Datainfo
集合中每个时间序列对象的属性单位
property of the corresponding channel in the file. If theDataFormat
参数设置为'native'
,daqread
设置单位
property to'native'
。
Each time series object will havetsdata.event
附加对应于与通道相关的事件日志的对象。