Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB 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:

t = timetorun()


Problem Group

Solution Statistics

13 correct solutions 319 incorrect solutions
Last solution submitted on May 08, 2015