Main Content

本页采用了机器翻译。点击此处可查看英文原文。

triangle

三角波测试信号

描述

示例

triangle(x) 根据以下方程从输入 x 生成三角波,

2|2(x12+x)|1,

其中 L 形括号代表内容的底层。输出波的范围从-1 到 1。使用 et 运算符作为输入,在测试步骤中在整个仿真时间内生成波。将 et 除以一个值来指定一个周期。在 Test SequenceTest Assessment 模块的测试步骤中使用 triangle 操作符。

示例

全部展开

Test Sequence 模块中,创建一个周期为 5 的三角波。

A test step that outputs a triangle wave signal with a period of 5 seconds while active.

Test Sequence 模块输出三角波:

The output of the Test Sequence block, shown in a Scope block.

输入参数

全部展开

测试步骤期间的值,指定为数值标量。

数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

版本历史记录

在 R2015a 中推出