Thursday, July 30, 2009

CPU time

cputime

Elapsed CPU time

Syntax

  • cputime

Description

cputime returns the total CPU time (in seconds) used by MATLAB from the time it was started. This number can overflow the internal representation and wrap around.

Examples

The following code returns the CPU time used to run surf(peaks(40)).

  • t = cputime; surf(peaks(40)); e = cputime-t

    e =
    0.4667

No comments:

Post a Comment