{"id":2274,"date":"2008-07-25T08:25:31","date_gmt":"2008-07-25T13:25:31","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/07\/25\/whats\/"},"modified":"2016-05-17T14:49:44","modified_gmt":"2016-05-17T18:49:44","slug":"whats","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/07\/25\/whats\/","title":{"rendered":"WHATS"},"content":{"rendered":"<div class=\"content\">\r\n\r\nAldo Caraceto, one of our Application Engineers from Italy, recently wrote to tell us about a new post on the File Exchange. He noted that\r\nthis file was particularly cool because \"it offers a feature which I would like to see natively in MATLAB,\" it has an easy-to-use\r\nsyntax, and the code is tightly implemented. I agree on all counts!\r\n\r\n&nbsp;\r\n\r\nThis week's Pick of the Week is from repeat-offender Matt Fig. Matt's <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=20615&amp;objectType=FILE (link no longer works)\">WHATS<\/a> file works just like the built-in MATLAB command WHAT--it lists MATLAB files in the current directory. But the output of\r\nWHATS differs from that of WHAT in an important way: all of the returned strings are hyperlinked to the files they refer to.\r\nClick on a link to an MFile, and the MFILE opens in the MATLAB editor. Click on a link to a MAT file, and data contained in\r\nthe file is automatically loaded:\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/whats_output.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nAlternatives are always good. WHATS gives users a nice Command-Window alternative to using the Current Directory Browser.\r\nOld-school MATLABbers who like to show only the command window (remember that the MATLAB environment is completely customizable!) will particularly appreciate this file. Thanks for sharing it, Matt!\r\n\r\nWe'd love to hear your thoughts about Matt's file, or about things you've done to customize your experience with MATLAB. Use\r\nthis Comments section to share your ideas on the topic!\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_bb8b941450eb454f8fe779bdf157c4f2() {\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='bb8b941450eb454f8fe779bdf157c4f2 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' bb8b941450eb454f8fe779bdf157c4f2';\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 = 'Brett Shoelson';\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\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\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;\"><a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\r\nPublished with MATLAB\u00ae 7.7\r\n\r\n<\/div>\r\n<!--\r\nbb8b941450eb454f8fe779bdf157c4f2 ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=1094803&objectType=author Aldo Caraceto>, one of our Application\r\n% Engineers from Italy, recently wrote to tell us about a new post on the File Exchange. He noted that this file was particularly cool because \"it offers a feature which I would like to see natively in MATLAB,\" it has an easy-to-use syntax, and the code is tightly implemented. I agree on all counts!\r\n%%\r\n% This week's Pick of the Week is from repeat-offender\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=1094381&objectType=author Matt Fig>. Matt's <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=20615&objectType=FILE WHATS> file\r\n% works just like the built-in MATLAB command WHATREPLACE_WITH_DASH_DASHit lists MATLAB\r\n% files in the current directory. But the output of WHATS differs from that\r\n% of WHAT in an important way: all of the returned strings are hyperlinked\r\n% to the files they refer to. Click on a link to an MFile, and the MFILE\r\n% opens in the MATLAB editor. Click on a link to a MAT file, and data\r\n% contained in the file is automatically loaded:\r\n%%\r\n%\r\n% <<C:\\MFILES\\POTW\\POTW Candidates\\images\\pick\\whats_output.png>>\r\n%\r\n%%\r\n% Alternatives are always good. WHATS gives users a nice Command-Window alternative to using the Current\r\n% Directory Browser. Old-school MATLABbers who like to show only the command window (remember that <https:\/\/www.mathworks.com\/access\/helpdesk\/help\/techdoc\/matlab_env\/f3-12599.html#f3-56361 the MATLAB environment is completely customizable>!) will particularly appreciate this file. Thanks for sharing it, Matt!\r\n%%\r\n% We'd love to hear your thoughts about Matt's file, or about things you've\r\n% done to customize your experience with MATLAB. Use this Comments section\r\n% to share your ideas on the topic!\r\n##### SOURCE END ##### bb8b941450eb454f8fe779bdf157c4f2\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nAldo Caraceto, one of our Application Engineers from Italy, recently wrote to tell us about a new post on the File Exchange. He noted that\r\nthis file was particularly cool because \"it offers a... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/07\/25\/whats\/\">read more >><\/a><\/p>","protected":false},"author":34,"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\/2274"}],"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\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2274"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2274\/revisions"}],"predecessor-version":[{"id":7204,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2274\/revisions\/7204"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}