Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
bitset
set bit at specified position
Calling Sequence
y = bitset(x, pos) y = bitset(x, pos, v)
Parameters
- x :
a
m-by-nmatrix of doubles or am1-by-m2-by-...-by-mmhypermatrix of doubles or am-by-nmatrix of unsigned integers (uint8,uint16oruint32). Must contain positive integer values.- pos :
a
m-by-nmatrix of doubles or am1-by-m2-by-...-by-mmhypermatrix of doubles or am-by-nmatrix of unsigned integers (uint8,uint16oruint32). Must contain positive integer values. The inputposmust be in the range 1,2,...,bitmaxwherebitmaxis the maximum number of bits inx.- v :
a
m-by-nmatrix of doubles or am1-by-m2-by-...-by-mmhypermatrix of doubles or am-by-nmatrix of unsigned integers (uint8,uint16oruint32). Defaultv=1. Must contain positive integer values.- y :
a
m-by-nmatrix of doubles or am1-by-m2-by-...-by-mmhypermatrix of doubles or am-by-nmatrix of unsigned integers.
Description
Set the bit at specified position pos.
Examples
| Report an issue | ||
| << bitor | Bitwise operations | bitxor >> |