matlab之程序运行时间

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yunduo93/article/details/89371719

常见的有三种方式


方式一

tic
%代码块
toc
%disp(['运行时间: ',num2str(toc)]);

方式二

t1=clock;
%代码块
t2=clock;
etime(t2,t1)

方式三

t0=cputime
%代码块
t1=cputime-t0

5.可编辑文本框中设初值

猜你喜欢

转载自blog.csdn.net/yunduo93/article/details/89371719
今日推荐