I suggest that you use timeit().
Also in my experience the times can vary a fair bit, so I recommend using timeit in a loop to record multiple times at the same size
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!