我需要在Matlab AppDesigner中创建动画,而且我不知道如何调用滴答声事件。
我在创建窗口时创建了递归函数,在这里我用pause(0.01)
调用了此函数,但它间歇性地移动。我认为,如果AppDesigner拥有tick事件,它将运行得更快。
function moveCubeInCord(app)
app.xo = app.xo + app.OuterSpeedKnob.Value / 10;
drawCubeInCord(app);
pause(0.01);
moveCubeInCord(app);
end
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function beginEvent(app)
moveCubeInCord(app);
end
end
我需要知道如何调用滴答声事件,或者使动画更加流畅。我正在使用在线版本,这可能是刹车的原因。