Reset function for object properties

1 次查看(过去 30 天)
I want to add a reset function and reset button that during the simulation it restore the initial value for the object properties whan it is pressed.
It is possible? Should I create a new function?
I write some parte of the code, because I'm starting to work with matlab about 1 week..
my idea is to restore the properties of the object to their initial values.
Prop1 = 0.4; Prop2 = 3.5;
function reset(obj)
obj.Tap.Prop1= obj.Prop1;
obj.Tap.Prop2 = obj.Prop2;
reset(obj.Tap);
where Prop1 and Prop2 are the properties of the object obj:
function obj = ProvaAudio ()
obj.Tap= dsp.Filter.....;
end
Thank you

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by