period, .
Decimal point, element-wise operations, indexing
Syntax
Description
The period symbol (.
) separates the integral and fractional parts
of a number, denotes element-wise operations, and also indexes table variables, structure
fields, and object properties and methods. For instance, the element-wise operation
A.*B
multiplies each element of A
with the
corresponding element in B
.
Examples
Tips
You can index structure fields with expressions using commands of the form
S.(expr)
. The variable or expression in parentheses must evaluate to a string scalar. For more information, see Generate Field Names from Variables.
Version History
Introduced before R2006a