{"id":163,"date":"2007-12-03T14:50:35","date_gmt":"2007-12-03T19:50:35","guid":{"rendered":"https:\/\/blogs.mathworks.com\/desktop\/2007\/12\/03\/start-up-your-m-files-in-style\/"},"modified":"2016-04-05T11:27:15","modified_gmt":"2016-04-05T15:27:15","slug":"start-up-your-m-files-in-style","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2007\/12\/03\/start-up-your-m-files-in-style\/","title":{"rendered":"Start Up Your M-Files in Style"},"content":{"rendered":"<p>Looking for a way to integrate your code into the MATLAB Start button? Welcome to info.xml!<\/p>\n<p>In just a few easy steps you can hook up your collection of m-files. MATLAB collects information for the Start button menu from info.xml files. All you need is one of these files in the directory with your code and that directory on the MATLAB search path. You can even give the info.xml files to friends, along with your M-files, and they can access your code from the Start button too.<\/p>\n<p><strong>1.<\/strong><\/p>\n<ol>\n<ol>To make things easy for you there\u2019s an example file in<\/ol>\n<\/ol>\n<p><em>&lt;matlabroot&gt;<\/em><\/p>\n<ol>\\help\\techdoc\\matlab_env\\examples\\startinfo.xml. Copy this file into your directory and rename it to info.xml.<\/ol>\n<p><strong>2.<\/strong><\/p>\n<ol>Add this directory to your MATLAB search path.<\/ol>\n<p><strong>3.<\/strong><\/p>\n<ol>Let\u2019s view the info.xml before making any changes. Select Start &gt; Desktop Tools &gt; View Start Button Configuration Files. You\u2019ll need to click the Refresh Start Button to see this new info.xml and again later after modifying an existing info.xml.<\/ol>\n<p><strong>4.<\/strong><\/p>\n<ol>In the Start Button Configuration Files dialog box, select the info.xml you just created (your new info.xml is named SpecSim (Example) Toolbox).<\/ol>\n<p><span class=\"Apple-style-span\" style=\"color: #0000ee; text-decoration: underline;\"><a title=\"Start Button Configuration Dialog\" href=\"https:\/\/blogs.mathworks.com\/images\/desktop\/configdialog.png\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/configdialog.png\" alt=\"Start Button Configuration Dialog\" \/><\/a><\/span><strong>5.<\/strong><\/p>\n<ol>Click the Open button to view the file in the Editor.<\/ol>\n<p><span class=\"Apple-style-span\" style=\"color: #551a8b; text-decoration: underline;\"><a title=\"info.xml File\" href=\"https:\/\/blogs.mathworks.com\/images\/desktop\/infoxml.png\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/infoxml.png\" alt=\"info.xml File\" \/><\/a><\/span><strong>6.<\/strong><\/p>\n<ol>Change the name from SpecSim (Example) to something unique and representing your M-file collection. (click Refresh Start Button in the Start Button Configuration Files dialog box). Notice that your named collection now appears in the Start &gt; Toolboxes menu.<\/ol>\n<p><strong>7.<\/strong><\/p>\n<ol>Now move\/change\/add other entries in the info.xml so they pertain to your code and are placed on the Start menu where you prefer. The first level of the start menu provides basic groups of products\/functionality such as MATLAB, Simulink, Toolboxes etc. You decide which of these groups your menu will be listed in. This value is placed next to the type tag.<\/ol>\n<p>For each main menu representing a collection of m-files you can specify:<\/p>\n<ul>\n<li><strong>matlabrelease<\/strong> &#8211; this value is your versioning information, it&#8217;s currently not used<\/li>\n<li><strong>name<\/strong> &#8211; name of your main menu<\/li>\n<li><strong>type<\/strong> &#8211; name of the menu group your main menu will cascade from. (allowable values are: matlab, simulink, toolbox, blockset, links_targets, other)<\/li>\n<li><strong>icon<\/strong> &#8211; path to an icon to display next to your main menu<\/li>\n<li><strong>help_location<\/strong> &#8211; path to HTML help files for your code<\/li>\n<\/ul>\n<p>For each main menu you can create a list of items (listitems) listed on a sub-menu off of your main menu. In addition to menu items launching your m files, you can add items for things such as demos and examples.<\/p>\n<ul>\n<li><span class=\"Apple-style-span\" style=\"font-weight: normal;\"><strong><strong>label<\/strong><\/strong> &#8211; name to be listed on you main menu<\/span><\/li>\n<li><span class=\"Apple-style-span\" style=\"font-weight: normal;\"><strong><strong>callback<\/strong> <\/strong>&#8211; the function that is run when the menu time is selected<\/span><\/li>\n<li><span class=\"Apple-style-span\" style=\"font-weight: normal;\"><span class=\"Apple-style-span\" style=\"font-weight: bold;\"><strong>i<\/strong><\/span><strong><strong>con<\/strong><\/strong> &#8211; the icon that shows up next to your menu item<\/span><\/li>\n<\/ul>\n<p>Here\u2019s an example:<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/lorimfile.png\" alt=\"Lori\u2019&lt;p&gt;&lt;p&gt;s info.xml File\" \/><\/p>\n<p>And the start menu&#8230;<\/p>\n<p style=\"text-align: center;\"><span class=\"Apple-style-span\" style=\"color: #0000ee; text-decoration: underline;\"><a title=\"Start Menu\" href=\"https:\/\/blogs.mathworks.com\/images\/desktop\/startmenu2.png\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/startmenu2.png\" alt=\"Start Menu\" \/><\/a><\/span><\/p>\n<p style=\"text-align: left;\">Now you can show off your code in style. By the way did you notice the XML syntax highlighting? The first person to return instructions on how to get the MATLAB Editor to highlight XML will receive a t-shirt!<\/p>\n<p style=\"text-align: left;\">We&#8217;d love to hear what you think about the Start Button. Leave a comment <a href=\"https:\/\/blogs.mathworks.com\/community\/?p=163#respond\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looking for a way to integrate your code into the MATLAB Start button? Welcome to info.xml!<br \/>\nIn just a few easy steps you can hook up your collection of m-files. MATLAB collects information for the&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2007\/12\/03\/start-up-your-m-files-in-style\/\">read more >><\/a><\/p>\n","protected":false},"author":50,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/163"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":3504,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/163\/revisions\/3504"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}