Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Integers > iconvert

iconvert

conversion to 1 or 4 byte integer representation

Calling Sequence

y = iconvert(X, itype)

Arguments

X

a matrix of floats or integers.

itype

an integer, a type of conversion.

y

a matrix of integers coded on one, two or four bytes.

Description

The iconvert function converts and stores data to one, two or four bytes integers.

itype = 0

return floating point numbers

itype = 1

return int8 numbers in the range [-128, 127]

itype = 11

return uint8 numbers in the range [0, 255]

itype = 2

return int16 numbers in the range [-32768, 32767]

itype = 12

return uint16 numbers in the range [0, 65535]

itype = 4

return int32 numbers in the range [-2147483648, 2147483647]

itype = 14

return uint32 numbers in the range [0, 4294967295]

Examples

b=int32([1 -120 127 312])
y=iconvert(b,1)

typeof(b)
typeof(y)

See Also

  • double — conversion from integer to double precision representation
  • int8 — conversion to one byte integer representation
  • inttype — type integers used in integer data types
Report an issue
<< Integers Integers int8 >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:46:52 CEST 2014