Symbol Symbol Name Role Description Examples
, Comma Separator
Use commas to separate row elements in an array, array subscripts, function input and output
arguments, and commands entered on the same line.
- horzcat
Separate row elements to create an array:
A = [12,13; 14,15]
Separate subscripts:
A(1,2)
Separate input and output arguments in function calls:
[Y,I] = max(A,[],2)
Separate multiple commands on the same line (showing output):
figure, plot(sin(-pi:0.1:pi)), grid on
MATLAB Operators and Special Characters