MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   MATLAB测量函数运行时间 (https://www.labfans.com/bbs/showthread.php?t=26398)

poster 2019-12-14 20:13

MATLAB测量函数运行时间
 
如何在MATLAB中打印函数的时间

例:

%%%TAKE TIME A = [2 1 3 ; 1 2 5 ;3 5 4 ] [U,S,V] = svd(A) %%%FINISH TIME 什么是语法?



[B]回答:[/B]

您还可以使用[URL="http://www.mathworks.com/help/techdoc/ref/tic.html"]tic和toc[/URL]的非单数形式:

tStart=tic; A = [2 1 3 ; 1 2 5 ;3 5 4 ] [U,S,V] = svd(A) tElapsed=toc(tStart); 这样可以使用多个计时器。 (否则,必须确保仅将tic和toc用于一种测量)



[url=https://stackoverflow.com/questions/5074513]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 03:03

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.