Main Content

Supported Variable Types

You can use the following data types for C/C++ code generation from MATLAB®:

Type

Description

char

Character array

complex

Complex data. Cast function takes real and imaginary components

double

Double-precision floating point

int8, int16, int32, int64

Signed integer

logical

Boolean true or false

single

Single-precision floating point

struct

Structure

uint8, uint16, uint32, uint64

Unsigned integer

Fixed-pointFixed-point data types