
55Proling MATLAB
®
Performance
• clock — This function returns the computer’s current date/time, as a 6-element
array of numbers, where the last (6th) element represents the seconds with mil-
lisecond resolution (e.g., 23.456).
>> clock % September 6, 2012 at 16:36:57.609
ans =
Columns 1 through 3
2012 9 6
Columns 4 through 6
16 36 57.609
clock’s actual resolution is provided on MATLAB R2013b and earlier by:
88
>> 1/feature('timing','clocks_per_sec')
ans =
0.001
• now — This function returns the computer’s current date/time, as a oating-point
number in units of days since the day before January 1, 0000. While the resolution
of the value suggests ...