Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case pauses for one second. Overall time elapsed for the test case should therefore be less than one second.
tic pause(1) superfast() toc
Elapsed time is 0.9876 seconds.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers105
Suggested Problems
-
Make a random, non-repeating vector.
11694 Solvers
-
Generate N equally spaced intervals between -L and L
954 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
873 Solvers
-
Switch matrix to a column vector
377 Solvers
-
Find the dimensions of a matrix
568 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
The behavior of the test environment is strange. It doesn't accept syntaxes like
function superfast
...
which my 2014a MATLAB has no problems with. I had to use
y = superfast(x)
even though there is no input or output.