coderTypeEditor - Launch the Coder Type Editor dialog box - MATLAB (original) (raw)

Main Content

Launch the Coder Type Editor dialog box

Since R2020a

Syntax

Description

coderTypeEditor [var1 ... varN](#mw%5F59e91dcb-c85d-42d1-b444-cb667336cc37) opens a Coder Type Editor dialog box 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.

example

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

coderTypeEditor -close closes an open Coder Type Editor dialog box.

Examples

collapse all

Open Coder Type Editor Populated with Types for Existing Variables

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 box opens. The Type Browser pane displays the name, class (data type), and size for coder.Type objectsmyArrayType, myCharVectorType, andmyStructType for the three workspace variables.

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

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

Input Arguments

collapse all

var1 ... varN — Workspace variables whose types you intend to view in the type editor

value belonging to a fundamental MATLAB class that supports code generation | value object | handle object | coder.Type object

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, thecoder.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

Version History

Introduced in R2020a