is it o.k if 'tic' is in one function and 'toc' is in another?
4 ビュー (過去 30 日間)
古いコメントを表示
is it o.k if 'tic' is in one function and 'toc' is in another? I am working with a gui and I want to set tic in one place and toc in a different function, possible?
0 件のコメント
採用された回答
Matt Fig
2012 年 10 月 15 日
編集済み: Matt Fig
2012 年 10 月 15 日
Yes, tic is global. Here is an example I made to test....
Example. 1st M-file:
function [] = calltic()
tic;
Second, separate M-file:
function [T] = calltoc()
T = toc;
From the command line:
>> calltic,calltoc
ans =
1.1999e-004
>> calltic,pause(.998),calltoc
ans =
1.0001
0 件のコメント
その他の回答 (1 件)
Image Analyst
2012 年 10 月 15 日
Wouldn't it be easy enough to try? Then you'd find out, probably quicker than asking here.
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Debugging and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!