Use the bitsliceget function to get the
entire set of bits of the fixed-point input a.
a = fi(85,0,8,0);
disp(bin(a))
01010101
c = bitsliceget(a);
disp(bin(c))
01010101
Use the bitsliceget function to get the
binary representation of a slice of consecutive bits, starting at position 6 and
with no specified endpoint.
a = fi(85,0,8,0);
disp(bin(a))
01010101
c = bitsliceget(a,6);
disp(bin(c))
010101
Use the bitsliceget function to get the
binary representation of a consecutive set of bit of matrix
a. For each element, start at position 4 and end at position
2. Specify the lidx and ridx indices
using fixed-point fi values.
Input array, specified as a scalar, vector, matrix, or multidimensional
array of built-in integers (since R2026b) or
fixed-point fi objects. If a has a
signed numerictype, the bit representation of the stored
integer is in two’s complement representation.
Data Types: int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
Start position of slice specified as a scalar of built-in type.
lidx represents the position in the slice closest
to the MSB.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
End position of slice specified as a scalar of built-in type. ridx
represents the position in the slice closest to the LSB (the bit at position
1).
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
Fixed-point fi output, returned as a scalar, vector, matrix, or
multidimensional array with no scaling. The word length is equal to slice
length, lidx-ridx+1.
If lidx and ridx are equal,
bitsliceget only slices one bit, and
bitsliceget(a,lidx,ridx) is the same as
bitget(a,lidx).
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.