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!