Reset function for object properties

1 view (last 30 days)
alfonso peta
alfonso peta on 28 Feb 2018
Edited: alfonso peta on 28 Feb 2018
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

Answers (0)

Categories

Find more on Software Development Tools in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!