MATLAB Answers

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

15 views (last 30 days)
jie xu
jie xu on 29 Oct 2020
Edited: Steven Lord on 29 Oct 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;

  0 Comments

Sign in to comment.

Answers (2)

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

  0 Comments

Sign in to comment.


Steven Lord
Steven Lord on 29 Oct 2020
Edited: Steven Lord on 29 Oct 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.

  0 Comments

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!

Translated by