{"id":348,"date":"2010-11-05T13:05:51","date_gmt":"2010-11-05T17:05:51","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/2010\/11\/05\/r2010b-matlab-changes\/"},"modified":"2019-10-29T13:42:16","modified_gmt":"2019-10-29T17:42:16","slug":"r2010b-matlab-changes","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2010\/11\/05\/r2010b-matlab-changes\/","title":{"rendered":"R2010b &#8211; MATLAB changes"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>Last week I <a href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/10\/29\/r2010b-more-image-processing-toolbox-changes\/\">wrote<\/a> about Image Processing Toolbox changes in R2010b, and this week I want to mention some MATLAB changes that particularly caught\r\n      my eye.\r\n   <\/p>\r\n   <p>I should start by saying that I don't plan to mention everything here. I encourage you to take a look at the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/rn\/bsjq1bj.html\">MATLAB release notes<\/a> to see what changes might be of interest to you. You should also take a look at <a href=\"https:\/\/blogs.mathworks.com\/desktop\">Mike on the MATLAB Desktop<\/a> and <a href=\"https:\/\/blogs.mathworks.com\/loren\">Loren on the Art of MATLAB<\/a> for their take on R2010b.\r\n   <\/p>\r\n   <p>First, in the \"small gems\" category, I love the new Ctrl-J keyboard shortcut for wrapping comments. I especially appreciate\r\n      that Ctrl-J will wrap a whole paragraph of comments without having to select the paragraph first. This is something I do all\r\n      the time when preparing blog posts.\r\n   <\/p>\r\n   <p>Second, I like the variable highlighting feature in the Editor. I don't know about this feature until one day it just started\r\n      happening in the development build. Here's a screenshot that Mike took showing the feature. Read his <a href=\"https:\/\/blogs.mathworks.com\/community\/2010\/10\/11\/automatic-variable-highlighting\/\">blog post<\/a> for more details.\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/michael_katz_variable_highlighting\/var_highlight.png\"> <\/p>\r\n   <p>A few months ago, a developer from another team stopped by my office to interview me about image files and image file I\/O\r\n      in MATLAB. It turns out he was working on a file previewer in the Current Folder browser. It's shipping now. Here's a screenshot\r\n      of the feature. (The screenshot is showing some of the files from my blog materials folder.)\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/file-previewer-screenshot.png\"> <\/p>\r\n   <p>On the math side, there's new support for arithmetic operators on uint64 and int64 data types.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">a = intmax(<span style=\"color: #A020F0\">'uint64'<\/span>)<\/pre><pre style=\"font-style:oblique\">\r\na =\r\n\r\n 18446744073709551615\r\n\r\n<\/pre><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">a\/2 + 5<\/pre><pre style=\"font-style:oblique\">\r\nans =\r\n\r\n  9223372036854775813\r\n\r\n<\/pre><p>On the programming side, object-oriented programming in MATLAB now supports the notion of <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/matlab_oop\/bsibelu.html\">enumerations<\/a>.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">clear\r\ntype <span style=\"color: #A020F0\">WeekDays<\/span><\/pre><pre style=\"font-style:oblique\">\r\nclassdef WeekDays\r\n   enumeration\r\n      Monday, Tuesday, Wednesday, Thursday, Friday\r\n   end\r\nend\r\n\r\n<\/pre><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">today = WeekDays.Tuesday<\/pre><pre style=\"font-style:oblique\">\r\ntoday = \r\n\r\n    Tuesday  \r\n\r\n<\/pre><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">whos<\/pre><pre style=\"font-style:oblique\">  Name       Size            Bytes  Class       Attributes\r\n\r\n  today      1x1               104  WeekDays              \r\n\r\n<\/pre><p>In the file import\/export category there are several new things to mention:<\/p>\r\n   <div>\r\n      <ul>\r\n         <li>A new <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/ref\/videowriterclass.html\">VideoWriter class<\/a>. Unlike the old <tt>avifile<\/tt>, the new class works cross-platform and can write files larger than 2 GB.\r\n         <\/li>\r\n         <li>netCDF 4 support<\/li>\r\n         <li>N-channel JPEG 2000 support<\/li>\r\n         <li>New functions added to low-level interfaces for HDF4, HDF5, and netCDF<\/li>\r\n         <li>Many new examples in the command line help for the HDF5, netCDF, and CDF low-level interfaces.<\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p>Do you have R2010b yet? What do you think?<\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_5c53dc8053ea477da113b259f01808bb() {\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='5c53dc8053ea477da113b259f01808bb ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 5c53dc8053ea477da113b259f01808bb';\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 = 'Steve Eddins';\r\n        copyright = 'Copyright 2010 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<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>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_5c53dc8053ea477da113b259f01808bb()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.11<br><\/p>\r\n<\/div>\r\n<!--\r\n5c53dc8053ea477da113b259f01808bb ##### SOURCE BEGIN #####\r\n%%\r\n% Last week I\r\n% <https:\/\/blogs.mathworks.com\/steve\/2010\/10\/29\/r2010b-more-image-processing-toolbox-changes\/\r\n% wrote> about Image Processing Toolbox changes in R2010b, and this week I\r\n% want to mention some MATLAB changes that particularly caught my eye.\r\n%\r\n% I should start by saying that I don't plan to mention everything here. I\r\n% encourage you to take a look at the\r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/rn\/bsjq1bj.html\r\n% MATLAB release notes> to see what changes might be of interest to you. You\r\n% should also take a look at <https:\/\/blogs.mathworks.com\/desktop Mike on\r\n% the MATLAB Desktop> and <https:\/\/blogs.mathworks.com\/loren Loren on the\r\n% Art of MATLAB> for their take on R2010b.\r\n%\r\n% First, in the \"small gems\" category, I love the new Ctrl-J keyboard\r\n% shortcut for wrapping comments. I especially appreciate that Ctrl-J will\r\n% wrap a whole paragraph of comments without having to select the paragraph\r\n% first. This is something I do all the time when preparing blog posts.\r\n%\r\n% Second, I like the variable highlighting feature in the Editor. I don't\r\n% know about this feature until one day it just started happening in the\r\n% development build. Here's a screenshot that Mike took showing the\r\n% feature. Read his <https:\/\/blogs.mathworks.com\/community\/2010\/10\/11\/automatic-variable-highlighting\/ \r\n% blog post> for more details.\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/desktop\/michael_katz_variable_highlighting\/var_highlight.png>>\r\n%\r\n% A few months ago, a developer from another team stopped by my office to\r\n% interview me about image files and image file I\/O in MATLAB. It turns out\r\n% he was working on a file previewer in the Current Folder browser. It's\r\n% shipping now. Here's a screenshot of the feature. (The screenshot is\r\n% showing some of the files from my blog materials folder.)\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2010\/file-previewer-screenshot.png>>\r\n%\r\n% On the math side, there's new support for arithmetic operators on uint64\r\n% and int64 data types.\r\n\r\na = intmax('uint64')\r\n\r\n%%\r\na\/2 + 5\r\n\r\n%%\r\n% On the programming side, object-oriented programming in MATLAB now\r\n% supports the notion of\r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/matlab_oop\/bsibelu.html\r\n% enumerations>.\r\n\r\nclear\r\ntype WeekDays\r\n\r\n%%\r\n\r\ntoday = WeekDays.Tuesday\r\n\r\n%%\r\nwhos\r\n\r\n%%\r\n% In the file import\/export category there are several new things to\r\n% mention:\r\n%\r\n% * A new <https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/ref\/videowriterclass.html\r\n% VideoWriter class>. Unlike the old |avifile|, the new class works\r\n% cross-platform and can write files larger than 2 GB.\r\n% * netCDF 4 support\r\n% * N-channel JPEG 2000 support\r\n% * New functions added to low-level interfaces for HDF4, HDF5, and netCDF\r\n% * Many new examples in the command line help for the HDF5, netCDF, and\r\n% CDF low-level interfaces.\r\n%\r\n% Do you have R2010b yet? What do you think?\r\n\r\n##### SOURCE END ##### 5c53dc8053ea477da113b259f01808bb\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Last week I wrote about Image Processing Toolbox changes in R2010b, and this week I want to mention some MATLAB changes that particularly caught\r\n      my eye.\r\n   \r\n   I should start by saying... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/11\/05\/r2010b-matlab-changes\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[302,569,717,719,306],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/348"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/comments?post=348"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/348\/revisions"}],"predecessor-version":[{"id":3705,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/348\/revisions\/3705"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}