Effacer les filtres
Effacer les filtres

Cyclic dependency in OOP

1 vue (au cours des 30 derniers jours)
Andrew Yuan
Andrew Yuan le 27 Déc 2018
I'm new to OOP in MATLAB, but I would like to define properties a,b,c in a class in such a way that if one of the value changes, then so do the other 2. For example, suppose that we have the relation, b = a+1, c = b+1, a = c-2. Hence, if I set the value b = 2, then c = 2+1 =3 and a = c -2 = 1.

Réponses (0)

Catégories

En savoir plus sur Software Development Tools dans Help Center et File Exchange

Tags

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by