Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

Logic and Bit Operations

逻辑或位运算模块,例如 Logical Operator 和 Relational Operator

使用 Logic and Bit Operations 库中的模块来检测信号值的变化,对输入执行逻辑或关系运算,并将位转换为整数。

模块

Bit ClearSet specified bit of stored integer to zero
Bit SetSet specified bit of stored integer to one
Bit to Integer ConverterMap vector of bits to corresponding vector of integers
Bitwise Operator对输入执行指定的按位运算
Combinatorial Logic实现真值表
Compare To Constant确定信号与指定常量的比较方式
Compare To Zero确定信号与零的比较方式
Detect Change检测信号值的变化
Detect Decrease检测信号值的减小
Detect Fall NegativeDetect falling edge when signal value decreases to strictly negative value, and its previous value was nonnegative
Detect Fall NonpositiveDetect falling edge when signal value decreases to nonpositive value, and its previous value was strictly positive
Detect Increase检测信号值的增长
Detect Rise NonnegativeDetect rising edge when signal value increases to nonnegative value, and its previous value was strictly negative
Detect Rise Positive上升沿检测,当信号值从上一个严格意义上的负值变为非负值时
Extract Bits输出从输入信号选择的连续位
Float Extract BitsExtract bits from floating-point input samples (自 R2023a 起)
Integer to Bit ConverterMap vector of integers to vector of bits
Interval Test确定信号是否在指定区间中
Interval Test DynamicDetermine if signal is in specified interval
Logical Operator对输入执行指定的逻辑运算
Relational Operator对输入执行指定的关系运算
Shift Arithmetic移动信号的位或二进制小数点