数据set signal format
Description
Format for logged数据set
叶子元素。
Category:数据导入/导出
环境s
Default:timeseries
-
timeseries
-
节省
数据set
MATLAB中的元素值®timeseries
格式。 -
timetable
-
节省
数据set
MATLAB中的元素值timetable
格式。
Comparison of Formats
这timetable
格式enables easier merging of logged data from multiple simulations.
Property Display
这timeseries
格式displays one field for time properties (TimeInfo
) and a second field for data properties (Datainfo
)。例如,以下是timeseries
object for a nonscalar signal.
ts
次数公共属性:名称:''时间:[1001x1 double] timeInfo:[1x1 tsdata.timemetadata]数据:[1001x1 double] datainfo:[1x1 tsdata.datametadata]
When you enter the name of atimetable
object (for example,tt
)并查询属性,您会看到所有属性。
tt.Properties
ans = with files:descripts:''userData:[] dimensionNames:{'time''''''} variabledescriptions:{} variablenames:['wend''wendspeed'windspeed'winddirection'] variableunits variableunits:{}']行时间:[64x1持续时间]
数据访问
访问已记录的数据timeseries
格式, use the数据
property for a signal. For example, for atimeseries
objectts
(only first five values shown):
ts = yout{1}.Values; ts.Data
ans = 0 -0.0002 -0.0012 -0.0062 -0.0306
这timetable
格式for logged数据set
数据生成一个带有一个时间列的表格,称为Time
, and one data column, called数据
。这Time
column is the simulation time vector for a given signal, stored as a duration type, with the setting of seconds to match the units of simulation time, starting with the simulation start time (typically set to0 sec
)。Simu金宝applink®signal dimensions of[n]
和[nx1]
are treated equivalently in thetimetable
representation. For example, for atimetable
objecttt
(only first five values shown):
tt = yout{1}.Values; tt.Data
时间数据_________ ____________ 0秒[1x3x2 double] 0.1秒[1x3x2 double] 0.2秒[1x3x2 double] 0.3 sec [1x3x2 double] 0.4 sec [1x3x2 double]
这number of samples is the first dimension in the数据
column of thetimetable
object, but it is the last dimension in the data field of loggedtimeseries
data that isnonscalar
。这refore, when you access data intimetable
格式,您可能需要重塑每个样本是非尺度阵列时的数据。一种选择是使用squeeze
function. For example, to access the first data row in the dataset, you can use a command like this:
squeeze(tt.Data{1,1})
ans = 1 2 3 4 5 6
If a signal is a bus or array of buses, the signal values are logged as a structure oftimetable
objects, with each leaf of the structure corresponding to the logged result of each leaf signal in the bus.
单位
For data logged in Simulink, thetimeseries
格式displays units for time values in the单位
property. Units can be specified as any value of any class. Timeseries logging sets the units to aSimulink.SimulationData.Unit
object, if the logged signal has units specified. For loading, units are honored only if they are of typeSimulink.SimulationData.Unit
; otherwise, they are ignored.
For thetimetable
格式, Simulink does not support units for logged data.
数据插值
这timeseries
格式Interpolation
属性显示插值方法是否为linear
(default) orZoh
。
这timetable
格式VariableContinuity
property characterizes variables as continuous or discrete. The possible values for simulation data are:
连续的
– Corresponds to thetimeseries
propertyInterpolation
setting oflinear
。Simulink uses this setting for filling continuous sample times.step
– Corresponds to thetimeseries
propertyInterpolation
setting ofZoh
。Simulink uses this setting for filling discrete sample times.
均匀和非均匀时间
这timeseries
格式displays whether the time data is uniform or nonuniform. For data logged for continuous sample times (linear interpolation), theTimeInfo
属性表明时间不均匀并给出长度。对于离散的样本时间(零级保持插值),TimeInfo
属性表示时间均匀,并给出长度和增量。
这timetable
格式does not have a property for uniform and nonuniform time data.
用于数据timeseries
或者timetable
格式, you can use the MATLAB是规则
功能以获取此时间信息。
Signal Name
这timeseries
格式stores the name of a logged signal in aSimulink.SimulationData.Element
wrapper object, as well as in thetimeseries
对象本身。
这timetable
格式stores the name of a logged signal in aSimulink.SimulationData.Element
包装对象,但不在timetable
对象本身。
Tips
这数据set signal formatparameter has no effect when usingScopeblocks to log data.
命令行信息
范围:数据setSignalFormat |
Value:'时间序列' |'时间表' |
Default:'时间序列' |
Recommended Settings
Application | 环境 |
---|---|
Debugging | 没有影响 |
Traceability | 没有影响 |
Efficiency | 没有建议 |
Safety precaution | 没有建议 |