主要内容

sawtooth

锯齿波测试信号

描述

y = sawtooth(x) 基于以下公式根据输入 x 创建锯齿波,

2(xx12),

其中 L 型括号表示对内容向下取整。输出波的范围为 -1 至 1。在测试步骤中,使用 et 运算符作为输入可在整个仿真时间内生成波。将 et 除以某个值可指定周期。在 Test Sequence 模块或 Test Assessment 模块的测试步骤中使用 sawtooth 运算符。

示例

示例

全部展开

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

A test step that outputs a sawtooth 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 中推出