## List of MATLAB special characters, meaning and application

Below we list each MATLAB special characters and explain their usage and meaning with a brief example.

## MATLAB Special character @ (At symbol)

This symbol is used when creating a function. To do this, the function name must be declared after the “@” symbol.

In the case of an anonymous function.

## MATLAB Special character . (Dot)

The dot separates the whole and fractional parts in decimal values.

The dot character also allows you to access the fields of a structure

This symbol is also used to access the properties and methods of an object.

## Special character … (Dot dot dot or ellipsis)

At the end of a line, this symbol indicates that the current command continues on the next line.

continuation of current command

## MATLAB Special character , (Comma)

This character is used to separate row elements of array subscripts.

Also, this character is used to separate the different input arguments in a function.

And to separate the different output arguments in a function

## MATLAB Special character : (Colon)

This character is used for creating vectors.

Also, the colon is used to define the limit in a “for” loop.

Index a range of elements in a specified dimension:

Assign new elements to an array:

5, 6, 7, 8;

1, 2, 3, 4 ]

x (:) = 1: 12

## MATLAB Special character ; (Semicolon)

This character is used to separate the rows in the creation of a matrix

5, 6, 7, 8;

1, 2, 3, 4]

It is also used to suppress the output of the current command.

Or to several separate commands written on a single line

## MATLAB Special character ( ) (Parentheses)

These characters are used to enclose the input arguments of a function.

Also, these special characters are used for array indexing.

b (2, 1)

They are also used in mathematical operations in operator precedence.

## MATLAB Special character [ ] (Square brackets)

These special characters are used for the creation of matrices and vectors.

v = [1, 2, 3, 4]

Square bracket to capture more than one input argument in a function.

Square brackets for the creation of an empty array.

Square bracket to add a new bottom row to an array.

Square bracket to remove a matrix column:

## MATLAB Special character { } (Curly braces )

These special characters are used in creating cell arrays.

## MATLAB Special character % (Percent )

The percent character is used to make comments. Everything written after this character on the current line is not considered code by MATLAB and is only useful as programmer annotation.

## MATLAB Special character % { %} (Percent curly bracket)

This character set is used to make comments that extend over more than one line. The %{ and %} operators must appear alone on the lines immediately preceding and following the text block as shown below.

This is a comment.

Everything enclosed within

these curly braces are considered

commentary by MATLAB.

%}

## MATLAB Special character ? (Question Mark )

This character retrieves the meta.class object. This operator only works with a class name, not an object.

## MATLAB Special character ‘ ‘ (Single quotes )

These characters are used to create character vectors with a class of char.

## MATLAB Special character “ “ (Double quotes )

These characters are used to create strings that have a class of strings.

## MATLAB Special character “Space“

This character represents a logical NOT.

Also, this character is used to suppress specific input or output arguments of a function.

## MATLAB Special character = (Equal )

This character assigns values to a variable.

The space character is used like commas to separate row elements in the construction of an array.

5 6 7 8]

Also, like commas, it is used to separate the values returned by a function.

## MATLAB Special character ~ (Tilde )

Also, to store the elements of a in the variable b.

## MATLAB Special character < & (Left angle bracket and ampersand )

This character set is used to specify superclasses.

And in the definition of a class that derives from a superclass:

## MATLAB Special character .? (Dot question mark )

This character set specifies the name-value structure fields.

In this case, the field names of the propArgs structure are specified as write properties of the matlab.graphics.primitive.Line class.

## Conclusion

In this article, we have shown you the list of MATLAB special characters and explained the meaning of each character with a short example. This programming language also has relational, arithmetic, logical operators, and escape characters, which are covered in our other MATLAB articles. We hope you found this MATLAB article useful. For more tips and information, see other Linux Hint articles.