万博1manbetx仿真软件。SampleTime类

包:万博1manbetx
超类:

包含样本时间信息的对象

描述

SampleTime类表示与单个样本时间关联的样本时间信息。

使用的方法万博1manbetxSimulink.Block.getSampleTimes万博1manbetxSimulink.BlockDiagram.getSampleTimes的值SampleTime块和框图的属性。

属性

价值

包含采样时间的周期和偏移量的双精度数数组

描述

1 xn描述示例时间类型的字符数组

ColorRGBValue

一个1x3的双精度数组,包含采样时间颜色的红、绿、蓝(RGB)值

注释

1 xn表示特定采样时间的注释的字符数组(例如,'D1')

OwnerBlock

对于异步和可变样本时间,OwnerBlock是一个字符向量,包含控制采样时间的块的完整路径。对于所有其他类型的样本时间,它是一个空的字符向量。

ComponentSampleTimes

如果示例时间是异步联合,或者示例时间是混合的,并且组件示例时间可用,那么数组ComponentSampleTimes包含Simulink。万博1manbetxSampleTime对象。

复制语义

价值。要了解值类如何影响复制操作,请参见复制对象在MATLAB®编程基础知识文档。

例子

检索“vdp”模型的示例时间信息。

ts = 万博1manbetxSimulink.BlockDiagram.getSampleTimes (vdp)

万博1manbetx仿真软件的回报:

ts = 1x2 万博1manbetxSimulink。SampleTime包:Simulink Properties: Value Description ColorRGBValue Annotation OwnerBlock ComponentSampleTimes Methods

检查属性的值:

ts (1), (2) ans =仿真万博1manbetx软件。SampleTime包:Simulink Properties: Value: [0 0] Description: 'Continuous' ColorRGBValue: [0 0 0] Annotation: 'Cont' OwnerBlock: [] ComponentSampleTimes: {} Methods ans = Simulink.SampleTime Package: Simulink Properties: Value: [Inf 0] Description: 'Constant' ColorRGBValue: [1 0.2600 0.8200] Annotation: 'Inf' OwnerBlock: [] ComponentSampleTimes: {} Methods