,
Name: Comma
Uses: Separator
Description: Use commas to separate row elements in an array, array subscripts,
function input and output arguments, and commands entered on the same line.
Examples
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
More Information
• horzcat
2 Program Components
2-6
Précédent

- 56/1450

Suivant