How to calculate the run time for m.file?

I have m. file and I want to calculate its run time I, I convert the m.file to functiion and call it in another file
state1 = finalisa3() tt=timeit(state1)
but I get error " Undefined function 'timeit' for input arguments of type 'char'.
Error in ch (line 36) tt=timeit(state1)"

Categories

Asked:

on 5 Feb 2015

Moved:

on 31 Dec 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!