{"id":2195,"date":"2008-05-05T12:14:58","date_gmt":"2008-05-05T17:14:58","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/05\/05\/advanced-matlab-timer-objects\/"},"modified":"2016-05-11T10:02:18","modified_gmt":"2016-05-11T14:02:18","slug":"advanced-matlab-timer-objects","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/05\/05\/advanced-matlab-timer-objects\/","title":{"rendered":"Advanced MATLAB: Timer objects"},"content":{"rendered":"<p>Sometimes you want something to update in MATLAB on a regular schedule. Timer objects can do that for you. We first introduced this for test and measurement applications, but it has since been moved into base MATLAB.<\/p>\n<p>In this simple example, we will create a timer object and have it fire a callback every second to output a random number to the command line.<\/p>\n<p>There are a lot more useful things to do with timer objects, of course. What have you done with them? [<a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2195\/#comment\">Comment here<\/a>]<\/p>\n<p><embed src=\"https:\/\/blogs.mathworks.com\/images\/pick\/\/FlashVideos\/FlowPlayer.swf?config=%7Bembedded%3Atrue%2CplayList%3A%5B%7BsuggestedClipsInfoUrl%3A%2795%20see%20also%2Etxt%27%2Curl%3A%2795%20Advanced%20timer%20object%2Eflv%27%7D%5D%2CbaseURL%3A%27http%3A%2F%2Fblogs%2Emathworks%2Ecom%2Fimages%2Fpick%2FFlashVideos%2F%27%2CsplashImageFile%3A%2795%20Advanced%20timer%20object%2Ejpg%27%2Cloop%3Afalse%2CinitialScale%3A%27fit%27%2CshowFullScreenButton%3Afalse%2CautoBuffering%3Afalse%2CmenuItems%3A%5Bfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Ctrue%5D%2CautoPlay%3Afalse%7D\" type=\"application\/x-shockwave-flash\" width=\"500\" height=\"400\"><\/embed><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you want something to update in MATLAB on a regular schedule. Timer objects can do that for you. We first introduced this for test and measurement applications, but it has since been moved&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/05\/05\/advanced-matlab-timer-objects\/\">read more >><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,8,2],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2195"}],"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\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2195"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2195\/revisions"}],"predecessor-version":[{"id":7116,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2195\/revisions\/7116"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}