Main Content

int32

Convert fi object to signed 32-bit integer

Description

b = int32(a) converts the fi object a to a signed 32-bit integer based on its real-world value. If necessary, the data is rounded-to-nearest and saturated to fit in an int32 type with no warning.

example

Examples

collapse all

a = fi([-pi 0.1 pi], 1, 32);
int32(a)
ans =

  1×3 int32 row vector

   -3    0    3

Input Arguments

collapse all

Input fi array, specified as a scalar, vector, matrix, or multidimensional array.

Data Types: fi
Complex Number Support: Yes

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

HDL Code Generation
Generate VHDL, Verilog and SystemVerilog code for FPGA and ASIC designs using HDL Coder™.

Version History

Introduced before R2006a