主要内容

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

Logic and Bit Operations

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

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

模块

Bit Clear blockBit ClearSet specified bit of stored integer to zero
Bit Set blockBit Set将存储整数的指定位设置为 1
Bit to Integer Converter blockBit to Integer ConverterMap vector of bits to corresponding vector of integers
Bitwise Operator blockBitwise Operator对输入执行指定的按位运算
Combinatorial Logic blockCombinatorial Logic实现真值表
Compare To Constant blockCompare To Constant确定信号与指定常量的比较方式
Compare To Zero blockCompare To Zero确定信号与零的比较方式
Detect Change blockDetect Change检测信号值的变化
Detect Decrease blockDetect Decrease检测信号值的减小
Detect Fall Negative blockDetect Fall Negative当信号值下降到严格值时检测下降沿,并且其先前的值非负
Detect Fall Nonpositive blockDetect Fall NonpositiveDetect falling edge when signal value decreases to nonpositive value, and its previous value was strictly positive
Detect Increase blockDetect Increase检测信号值的增长
Detect Rise Nonnegative blockDetect Rise Nonnegative当信号值增加到非值时检测上升沿,并且其先前的值严格为负
Detect Rise Positive blockDetect Rise Positive上升沿检测,当信号值从上一个严格意义上的负值变为非负值时
Extract Bits blockExtract Bits输出从输入信号选择的连续位
Extract Bits blockFloat Extract BitsExtract bits from floating-point input samples (自 R2023a 起)
Integer to Bit Converter blockInteger to Bit ConverterMap vector of integers to vector of bits
Interval Test blockInterval Test确定信号是否在指定区间中
Interval Test Dynamic blockInterval Test Dynamic确定信号是否在指定区间中
Logical Operator blockLogical Operator对输入执行指定的逻辑运算
Relational Operator blockRelational Operator对输入执行指定的关系运算
Shift Arithmetic blockShift Arithmetic移动信号的位或二进制小数点