What is Unit8?

62 次查看(过去 30 天)
ALI IQBAL
ALI IQBAL 2011-12-7
Tell me the concept of unit8.
.............plz

回答(3 个)

Jan
Jan 2011-12-7
编辑:Image Analyst 2022-12-3
See:
help uint8
UINT8 Convert to unsigned 8-bit integer. I = UINT8(X) converts the elements of the array X into unsigned 8-bit integers. X can be any numeric object, such as a DOUBLE. The values of a UINT8 range from 0 to 255, or INTMIN('uint8') to INTMAX('uint8'). Values outside this range saturate on overflow, namely they are mapped to 0 or 255 if they are outside the range. If X is already an unsigned 8-bit integer array, then UINT8 has no effect. DOUBLE and SINGLE values are rounded to the nearest UINT8 value on conversion. Some arithmetic operations are defined for UINT8 on interaction with other UINT8 arrays. For example, +, -, .*, ./, .\ and .^. If at least one operand is scalar, *, /, \ and ^ are also defined. UINT8 arrays may also interact with scalar DOUBLE variables, including constants, and the result of the operation is UINT8. UINT8 arrays saturate on overflow in arithmetic. You can define or overload your own methods for the UINT8 class (as you can for any object) by placing the appropriately named method in an @uint8 directory within a directory on your path. Type HELP DATATYPES for the names of the methods you can overload. A particularly efficient way to initialize a large UINT8 arrays is: I = zeros(1000,1000,'uint8') which creates a 1000x1000 element UINT8 array, all of whose entries are zero. You can also use ONES and EYE in a similar manner. Example: X = 17 * ones(5,6,'uint8') See also DOUBLE, SINGLE, DATATYPES, ISINTEGER, UINT16, UINT32, UINT64, INT8, INT16, INT32, INT64, INTMIN, INTMAX, EYE, ONES, ZEROS. Documentation for uint8 doc uint8 Other uses of uint8 categorical/uint8 embedded.fi/uint8 matlab/uint8 codistributed/uint8 gpuArray/uint8 opc.hda.Data/uint8

Andrei Bobrov
Andrei Bobrov 2011-12-7
移动:Image Analyst 2022-12-3
Maybe a misspelling of uint8?

k.v.swamy
k.v.swamy 2011-12-7
编辑:Image Analyst 2022-12-3
It is probably not unit8 but the actual one is uint8, which stands for unsigned integer data type and varies from 0 to 255.
help uint8
UINT8 Convert to unsigned 8-bit integer. I = UINT8(X) converts the elements of the array X into unsigned 8-bit integers. X can be any numeric object, such as a DOUBLE. The values of a UINT8 range from 0 to 255, or INTMIN('uint8') to INTMAX('uint8'). Values outside this range saturate on overflow, namely they are mapped to 0 or 255 if they are outside the range. If X is already an unsigned 8-bit integer array, then UINT8 has no effect. DOUBLE and SINGLE values are rounded to the nearest UINT8 value on conversion. Some arithmetic operations are defined for UINT8 on interaction with other UINT8 arrays. For example, +, -, .*, ./, .\ and .^. If at least one operand is scalar, *, /, \ and ^ are also defined. UINT8 arrays may also interact with scalar DOUBLE variables, including constants, and the result of the operation is UINT8. UINT8 arrays saturate on overflow in arithmetic. You can define or overload your own methods for the UINT8 class (as you can for any object) by placing the appropriately named method in an @uint8 directory within a directory on your path. Type HELP DATATYPES for the names of the methods you can overload. A particularly efficient way to initialize a large UINT8 arrays is: I = zeros(1000,1000,'uint8') which creates a 1000x1000 element UINT8 array, all of whose entries are zero. You can also use ONES and EYE in a similar manner. Example: X = 17 * ones(5,6,'uint8') See also DOUBLE, SINGLE, DATATYPES, ISINTEGER, UINT16, UINT32, UINT64, INT8, INT16, INT32, INT64, INTMIN, INTMAX, EYE, ONES, ZEROS. Documentation for uint8 doc uint8 Other uses of uint8 categorical/uint8 embedded.fi/uint8 matlab/uint8 codistributed/uint8 gpuArray/uint8 opc.hda.Data/uint8

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by