Change class property inside of class function/method
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Construct and Work with Object Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!