{"id":2298,"date":"2008-08-22T08:05:28","date_gmt":"2008-08-22T13:05:28","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/08\/22\/stopwatch\/"},"modified":"2021-09-22T15:26:32","modified_gmt":"2021-09-22T19:26:32","slug":"stopwatch","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/08\/22\/stopwatch\/","title":{"rendered":"Stopwatch"},"content":{"rendered":"<div class=\"content\">\r\n\r\nBob's pick this week is Stopwatch by Joseph Kirk.\r\n\r\nFor starters this is a useful tool. Sometimes you just want to time a real world event. Who knows where Coach Jones went but\r\nMATLAB is right there on your PC. Grab <tt>stopwatch<\/tt> off the File Exchange and see just how long it takes that vibration to fizzle (or how fast Cindy can chug that espresso).\r\n\r\nStopwatch is easy to use. It offers some nice features like time offset so it doubles as a count-down timer. The help includes\r\nlots of examples which is always a good thing.\r\n\r\nThe code metrics for this submission caught my eye. Top marks on all but cyclomatic complexity. Not bad at all.\r\n\r\nNow look at all the reviews. Note that the first comment is on the bottom and the latest is on top. Then look at the change history (bottom of submission page). Joe used feedback from others to make his submission better. What a great example of social computing. Keep it up, Joe!\r\n\r\n<b>Comments?<\/b>\r\n\r\nDo you have a similar use for MATLAB? Tell us about it <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2298#respond\">here<\/a>.\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_d1290011c75444419b64b2a5a998666b() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='d1290011c75444419b64b2a5a998666b ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' d1290011c75444419b64b2a5a998666b';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Robert Bemis';\r\n        copyright = 'Copyright 2008 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae 7.6<\/p>\r\n\r\n<\/div>\r\n<!--\r\nd1290011c75444419b64b2a5a998666b ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=969735&objectType=author % Bob>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=12628&objectType=file Stopwatch>\r\n% by Joseph Kirk.\r\n%%\r\n% https:\/\/www.mathworks.com\/matlabcentral\/files\/12628\/stopwatch.png\r\n%%\r\n% For starters this is a useful tool. Sometimes you just want to time a real\r\n% world event. Who knows where Coach Jones went but MATLAB is right there on\r\n% your PC. Grab |stopwatch| off the File Exchange and see just how long it\r\n% takes that vibration to fizzle (or how fast Cindy can chug that espresso).\r\n%%\r\n% Stopwatch is easy to use. It offers some nice features like time offset so\r\n% it doubles as a count-down timer. The help includes lots of examples which\r\n% is always a good thing.\r\n%%\r\n% The\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=12628&objectType=scoreDetails code metrics>\r\n% for this submission caught my eye. Top marks on all but cyclomatic\r\n% complexity. Not bad at all.\r\n%%\r\n% Now look at all the\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadRatings.do?objectId=12628&objectType=file&all reviews>.\r\n% Note that the first comment is on the bottom and the latest is on top.\r\n% Then look at the change history (bottom of\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=12628&objectType=file submission page>).\r\n% Joe used feedback from others to make his submission better. What an great\r\n% example of social computing. Keep it up, Joe!\r\n\r\n%%\r\n% *Comments?*\r\n%%\r\n% Do you have a similar use for MATLAB? Tell us about it\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2298#respond here>.\r\n\r\n##### SOURCE END ##### d1290011c75444419b64b2a5a998666b\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nBob's pick this week is Stopwatch by Joseph Kirk.\r\n\r\nFor starters this is a useful tool. Sometimes you just want to time a real world event. Who knows where Coach Jones went but\r\nMATLAB is right... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/08\/22\/stopwatch\/\">read more >><\/a><\/p>","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2298"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2298"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2298\/revisions"}],"predecessor-version":[{"id":14262,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2298\/revisions\/14262"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}