Change class property inside of class function/method
Afficher commentaires plus anciens
I would like assign a new value to a variable created in my class, but the below approach does not update the variable. Is there a different approach?
classdef class_1
properties
var_1
end
function consistency_check_trades(obj)
obj. var_1 = 2
end
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Construct and Work with Object Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!