在状态流图中提供时间模拟

时间:2015-03-29 23:37:11

标签: matlab time get stateflow

我希望在模拟状态流程序时获得模拟时间,而且我不知道哪个命令可以在每个运行步骤中给我时间。

你能帮助我吗?

谢谢。

1 个答案:

答案 0 :(得分:0)

您可以使用tic-toc

tic
% doing something 
toc 
...
tic 
% doing something
toc

一般情况下,我会profile

profile on
%Your code here
profile viewer 

输出将显示您的代码在每个函数调用或条件语句等上花费的时间。更多信息here