MATLAB Functions Help Desk

tic, toc

Purpose

Stopwatch timer

Syntax

Description

tic starts a stopwatch timer.

toc prints the elapsed time since tic was used.

t = toc returns the elapsed time in t.

Examples

This example measures how the time required to solve a linear system varies with the order of a matrix.

See Also

clock       Current time as a date vector

cputime     Elapsed CPU time

etime       Elapsed time



[ Previous | Help Desk | Next ]