Is there a difference between declaring a class property "Dependent" versus "Dependent = true"?

1 visualizzazione (ultimi 30 giorni)
The title says it all. The documentation doesn't make it clear whether or not there is a difference between
properties(Dependent)
aProp
end
and
properties(Dependent=true)
aProp
end
since it uses both seemingly interchangeably. Is there a difference?

Risposta accettata

Matt J
Matt J il 12 Lug 2019
Modificato: Matt J il 12 Lug 2019
Yes, they are equivalent. Also, you can do,
properties(~Dependent)
aProp
end
as an equivalent to,
properties(Dependent=false)
aProp
end
See also,

Più risposte (1)

Brendan Hamm
Brendan Hamm il 12 Lug 2019
There is no difference. For attributes which are binary (true/false) then just putting the attribute name is the same as toggling it from its default state.

Categorie

Scopri di più su Construct and Work with Object Arrays in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by