S-function axes reset issue.

Hi,
I have a S-function block written in Matlab level1. The block has codes to animate my simulink model. I have created a uicontrol push-button that calls a clear function in order to clear all my graphics and reset the animation to start again again from initialize values. However, when I press the button, all what I get is a quick clearing and then the animation objects continue from the same point where they cleared at. Could anyone help with this. Thanks!
Please see below: my uicontrol and clear function codes:
1-Uicontrol in the initialization function (mdlInitializeSizes):
uicontrol('Parent',Main,...
'Style','pushbutton'...
%etc,...%
'Callback',@(src,evt) reset);
2- The clear function:
function reset (src,evt);
cla
clear all

Réponses (0)

Catégories

En savoir plus sur Block and Blockset Authoring dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by