Reset function for object properties

1 回表示 (過去 30 日間)
alfonso peta
alfonso peta 2018 年 2 月 28 日
編集済み: alfonso peta 2018 年 2 月 28 日
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 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by