The issue is pause, not timeit:
"STATE = pause(...) returns the state of pause previous to processing the input arguments."
>> t2 = timeit(g,0)
t2 =
2.000208413333
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!