Main Content

Input Specification

Specify properties of MATLAB® function input variables to enable code generation

Specification of input types and properties is required for code generation. The code generator uses the input information to determine what types, sizes, and other properties are produced for subsequent variable definition. Perform input specification from the app, at the command line, or by using the Coder Type Editor, and from outside or inside of your function code, using functions such as coder.typeof, coder.varsize, and assert. For certain input types such as cells, classes, and globals, input specification can involve additional considerations.

Functions

coder.getArgTypesDetermine types of function input arguments by executing test file
coder.newtypeCreate coder.Type object to represent type of an entry-point function input
coder.resizeResize coder.Type object
coder.typeofCreate coder.Type object to represent the type of an entry-point function input
coder.varsizeDeclare variable-size data
coderTypeEditorLaunch the Coder Type Editor dialog

Classes

coder.ArrayTypeRepresent set of MATLAB arrays
coder.CellTypeRepresent set of MATLAB cell arrays
coder.ClassTypeRepresent set of MATLAB classes
coder.ConstantSpecification of constant value for code generation
coder.EnumTypeRepresent set of MATLAB enumerations
coder.FiTypeRepresent set of MATLAB fixed-point arrays
coder.PrimitiveTypeRepresent set of logical, numeric, or char arrays
coder.StructTypeRepresent set of MATLAB structure arrays
coder.TypeRepresent set of MATLAB values

Objects

coder.OutputTypeOutput type from an entry-point function to specify as an input type

Topics

Input Specification Basics

MATLAB Coder App

Cell Arrays

Value Classes

Global Data

Constant Data

String Scalars