Main Content


Launch the Coder Type Editor dialog


coderTypeEditor opens an empty Coder Type Editor dialog. If a dialog is already open, this command brings it to the front of the screen.

You can use the Coder Type Editor to create and edit coder.Type objects interactively. See Create and Edit Input Types by Using the Coder Type Editor.


coderTypeEditor var1 ... varN opens a Coder Type Editor dialog pre-populated with coder.Type objects corresponding to the workspace variables var1 through varN. For a variable var, the name of the generated coder.Type object is varType.

coderTypeEditor -all opens a Coder Type Editor dialog pre-populated with coder.Type objects corresponding to all compatible variables in the current workspace.

coderTypeEditor -close closes an open Coder Type Editor dialog.


collapse all

In your MATLAB® workspace, define variables var1, var2, and var3.

myArray = magic(4);
myCharVector = 'Hello, World!';
myStruct = struct('a',5,'b','mystring');

Open the type editor pre-populated with types for var1, var2, and var3.

coderTypeEditor myArray myCharVector myStruct

The Coder Type Editor dialog opens. The Type Browser pane displays the name, class (data type), and size for coder.Type objects myArrayType, myCharVectorType, and myStructType for the three workspace variables.

Inspect the created types and check that they are consistent with the variables in the workspace.

  • myArrayType represents a 4-by-4 array of type double.

  • myCharVectorType represents a 1-by-13 character row vector.

  • myStructType represents a scalar of type struct. Expand the tree corresponding to myStructType in the Type Browser. The field a represents a scalar double. The field b represents a 1-by-8 character vector.

To save these types in the base workspace, in the Coder Type Editor toolstrip, click Save. The variables myArrayType, myCharVectorType, and myStructType appear in the base workspace.

Input Arguments

collapse all

Workspace variables whose types you intend to view in the type editors. They can store any value that is compatible with code generation.

The value can also be a coder.Type object. In that case, the coder.Type object itself opens in the type editor.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | table | cell | categorical | datetime | duration | timetable | fi | value object | coder.Type object
Complex Number Support: Yes

Introduced in R2020a