.
Name: Period or dot
Uses:
• Decimal point
• Element-wise operations
• Structure field access
• Object property or method specifier
Description: The period character separates the integral and fractional parts of a
number, such as 3.1415. MATLAB operators that contain a period always work elementwise. The period character also enables you to access the fields in a structure, as well as
the properties and methods of an object.
Examples
Decimal point:
102.5543
Element-wise operations:
A.*B
A.^2
Structure field access:
myStruct.f1
Object property specifier:
myObj.PropertyName
More Information
• “Array vs. Matrix Operations” on page 2-20
• “Structures”
• “Access Property Values”
2 Program Components
2-4
Name: Period or dot
Uses:
• Decimal point
• Element-wise operations
• Structure field access
• Object property or method specifier
Description: The period character separates the integral and fractional parts of a
number, such as 3.1415. MATLAB operators that contain a period always work elementwise. The period character also enables you to access the fields in a structure, as well as
the properties and methods of an object.
Examples
Decimal point:
102.5543
Element-wise operations:
A.*B
A.^2
Structure field access:
myStruct.f1
Object property specifier:
myObj.PropertyName
More Information
• “Array vs. Matrix Operations” on page 2-20
• “Structures”
• “Access Property Values”
2 Program Components
2-4
