Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1690. Return elapsed time

Created by Matt Eicholtz

Write a function that returns the amount of time it takes to run the function, as measured by tic and toc. Your answer must be correct to within 5 milliseconds.

Basic template is:

tic
t = timetorun()
toc

Tags

Problem Group

Solution Statistics

11 correct solutions 285 incorrect solutions
Last solution submitted on Jul 06, 2014