Function of the test program running time in matlab

xiaoxiao2021-03-06  99

source:

Http://genial.yculblog.com/post-115016.html

Mountain City Battle Truck @ 2004-08-04 13: 061. Profile

example:

PROFILE ON

Plot (Magic (35))

Profile Viewer

PROFSAVE (PROFILE ('Info'), 'Profile_Results'

Profile on -history

Plot (Magic (4));

P = profile ('info');

For n = 1: size (P.FunctionHistory, 2)

IF P.FunctionHistory (1, n) == 0

Str = 'Entering function:';

Else

Str = 'exiting function:';

end

Disp ([Str P.FunctionTable (P.FunctionHistory (2, n)). functionName]);

end

2. TIC, TOC

TIC, Operation, TOC

3. CPUTIME

T = CPUTIME; Your_Operation; CPUTIME-T

4. Clock, Etime

T0 = ​​clock;

Operation

ETIME (Clock, T0)

转载请注明原文地址:https://www.9cbs.com/read-124108.html

New Post(0)