coder.StringType Class
Namespace: coder
Superclasses: coder.Type
Description
Objects of coder.StringType
specify a set of string inputs the generated
code accepts. Use objects of this class only with the -args
option of the
codegen
command to specify input types to the code generator. Do not pass as an
input to a generated MEX function.
Creation
Description
creates a t
= coder.typeof(sInput
)coder.StringType
object that has the same properties as the
string input sInput
.
creates a
t
= coder.newtype('string')coder.StringType
object for a string scalar. A string scalar contains one
piece of text represented as a character vector. To specify the length of the character
vector and whether the length has variable-size, set the StringLength
property to the required size and set VariableStringLength
to
true
. For example, setting t.StringLength = 10
and
t.VariableStringLength = true
specify that the string scalar has
variable-size with an upper bound of 10.
Input Arguments
Properties
Examples
Version History
Introduced in R2022b