is it o.k if 'tic' is in one function and 'toc' is in another?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Matt Fig
am 15 Okt. 2012
Bearbeitet: Matt Fig
am 15 Okt. 2012
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 Kommentare
Weitere Antworten (1)
Image Analyst
am 15 Okt. 2012
Wouldn't it be easy enough to try? Then you'd find out, probably quicker than asking here.
2 Kommentare
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!