What does this syntax mean? “yyy(1,1) logical = xxx”

2 Ansichten (letzte 30 Tage)
jie xu
jie xu am 29 Okt. 2020
Bearbeitet: Steven Lord am 29 Okt. 2020
I found such a syntax in the class definition of the built-in toolbox, but I don't know what it means.
What is the syntax? What does it mean?
Where can I find a comprehensive grammar explanation?
What does "(1,1)" mean?
What does "logical" stand for?
IsEarthCentered(1,1) logical = trackingScenario.DefaultIsEarthCentered;

Antworten (2)

Walter Roberson
Walter Roberson am 29 Okt. 2020
It is a property name, size, datatype, and initial value.

Steven Lord
Steven Lord am 29 Okt. 2020
Bearbeitet: Steven Lord am 29 Okt. 2020
See this documentation page for information about the property validation syntax used in properties blocks inside a classdef file.
This line:
IsEarthCentered(1,1) logical = trackingScenario.DefaultIsEarthCentered;
means that any value you assign to the IsEarthCentered property must be a scalar (1-by-1) value that is logical or can be converted to a logical. If you don't set it, the default value of that property is the value of (what I suspect to be a Constant property of the trackingScenario class, based on the name) trackingScenario.DefaultIsEarthCentered.

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by