{"id":10821,"date":"2019-06-21T09:00:55","date_gmt":"2019-06-21T13:00:55","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=10821"},"modified":"2019-06-19T16:59:24","modified_gmt":"2019-06-19T20:59:24","slug":"beer-me","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2019\/06\/21\/beer-me\/","title":{"rendered":"Beer Me!"},"content":{"rendered":"<div xmlns:mwsh=\"http:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\n   <introduction><\/p>\n<p><a href=\"http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495\">Sean<\/a>&#8216;s pick this week is <a href=\"http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/62347\">beerme<\/a> by <a href=\"http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/6836521\">bheinle7<\/a>.\n      <\/p>\n<p>   <\/introduction><\/p>\n<p>Have you ever looked at your MATLAB Apps tab and been sad?  Even though the MathWorks apps allow you to interactively accomplish what could be a difficult workflow like: tuning a PID, designing a filter, analyzing a signal or generating embeddable code from your MATLAB algorithm &#8211; they&#8217;re still work related.\n   <\/p>\n<p>Well now there&#8217;s an app for your happy hour needs.  Beer me is pretty straight forward: it&#8217;s an app that pairs your meal with a beer.\n   <\/p>\n<p>My colleague, Ed, and I watched the disaster that was the Stanley Cup Game 7 at a sports bar in Canada.  Since we were having burgers, the recommendation was an American Amber Ale.\n   <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainBeerMe\/beermescreenshot.png\"> <\/p>\n<p>A red ale was the closest they had so it will have to do.  Delicous!<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainBeerMe\/sg7.png\"> <\/p>\n<h3>Resizing<a name=\"2\"><\/a><\/h3>\n<p>Now as you can see, the app didn&#8217;t resize particularly well and doesn&#8217;t look particularly good on my laptop screen.  Starting in R2019a, App Designer has app designs that <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2019a\/matlab\/creating_guis\/apps-with-auto-reflow.html\">reflow<\/a> an app if the monitor size or type changes.  Additionally, you can add <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2019a\/matlab\/creating_guis\/app-or-gui-with-instrument-controls.html\">grid layouts<\/a> to an app so it resizes intelligently, keeping some components like buttons fixed size and others like axes allowed to expand.\n   <\/p>\n<p>To use auto reflow, select one of the below templates when you open app designer.<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainBeerMe\/reflow.png\"> <\/p>\n<p>To add and configure a grid, select grid layout and then the little icon in the upper left corner to edit it.<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainBeerMe\/gridlayout.png\"> <\/p>\n<h3>Comments<a name=\"3\"><\/a><\/h3>\n<p>Give it a try and let us know what you think or what kind of beer you&#8217;re having <a href=\"http:\/\/blogs.mathworks.com\/pick\/?p=10821#respond\">here<\/a> or leave a <a href=\"http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/62347#comments\">comment<\/a> for bheinle7.\n   <\/p>\n<p><script language=\"JavaScript\">\n<!--\n\n    function grabCode_b03b46c73aa64b40b0a648772a3c74ea() {\n        \/\/ Remember the title so we can use it in the new page\n        title = document.title;\n\n        \/\/ Break up these strings so that their presence\n        \/\/ in the Javascript doesn't mess up the search for\n        \/\/ the MATLAB code.\n        t1='b03b46c73aa64b40b0a648772a3c74ea ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' b03b46c73aa64b40b0a648772a3c74ea';\n    \n        b=document.getElementsByTagName('body')[0];\n        i1=b.innerHTML.indexOf(t1)+t1.length;\n        i2=b.innerHTML.indexOf(t2);\n \n        code_string = b.innerHTML.substring(i1, i2);\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\n\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \n        \/\/ in the XML parser.\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\n        \/\/ doesn't go ahead and substitute the less-than character. \n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\n\n        author = 'Sean de Wolski';\n        copyright = 'Copyright 2019 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('\n\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>\n\n\\n');\n      \n      d.title = title + ' (MATLAB code)';\n      d.close();\n      }   \n      \n-->\n<\/script><\/p>\n<p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><a href=\"javascript:grabCode_b03b46c73aa64b40b0a648772a3c74ea()\"><span style=\"font-size: x-small;        font-style: italic;\">Get<br \/>\n            the MATLAB code<br \/>\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\n<p>      Published with MATLAB&reg; R2019b<\/p>\n<\/div>\n<p><!--\nb03b46c73aa64b40b0a648772a3c74ea ##### SOURCE BEGIN #####\n%% Beer Me!\n%\n% <http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495 Sean>'s pick this week is\n% <http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/62347 beerme> by\n% <http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/6836521 bheinle7>.\n% \n\n%% \n% Have you ever looked at your MATLAB Apps tab and been sad?  Even though\n% the MathWorks apps allow you to interactively accomplish what could be a\n% difficult workflow like: tuning a PID, designing a filter, analyzing a\n% signal or generating embeddable code from your MATLAB algorithm - they're\n% still work related.\n%\n% Well now there's an app for your happy hour needs.  Beer me is pretty\n% straight forward: it's an app that pairs your meal with a beer.\n%\n% My colleague, Ed, and I watched the disaster that was the Stanley Cup\n% Game 7 at a sports bar in Canada.  Since we were having burgers, the\n% recommendation was an American Amber Ale.  \n%\n% <<beermescreenshot.png>>\n%\n% A red ale was the closest they had so it will have to do.  Delicous!\n%\n% <<sg7.png>>\n%\n%% Resizing\n% Now as you can see, the app didn't resize particularly well and doesn't\n% look particularly good on my laptop screen.  Starting in R2019a, App\n% Designer has app designs that\n% <https:\/\/www.mathworks.com\/help\/releases\/R2019a\/matlab\/creating_guis\/apps-with-auto-reflow.html\n% reflow> an app if the monitor size or type changes.  Additionally, you\n% can add\n% <https:\/\/www.mathworks.com\/help\/releases\/R2019a\/matlab\/creating_guis\/app-or-gui-with-instrument-controls.html\n% grid layouts> to an app so it resizes intelligently, keeping some\n% components like buttons fixed size and others like axes allowed to\n% expand.\n%\n%\n% To use auto reflow, select one of the below templates when you open app\n% designer.\n%\n% <<reflow.png>>\n%\n% To add and configure a grid, select grid layout and then the little icon in the upper\n% left corner to edit it.\n%\n% <<gridlayout.png>>\n\n%% Comments\n% \n% Give it a try and let us know what you think or what kind of beer you're\n% having <http:\/\/blogs.mathworks.com\/pick\/?p=10821#respond here> or leave a\n% <http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/62347#comments\n% comment> for bheinle7.\n%\n \n\n##### SOURCE END ##### b03b46c73aa64b40b0a648772a3c74ea\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainBeerMe\/beermescreenshot.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>Sean&#8216;s pick this week is beerme by bheinle7.<\/p>\n<p>Have you ever looked at your MATLAB Apps tab and been sad?  Even though the MathWorks apps allow you to interactively accomplish&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2019\/06\/21\/beer-me\/\">read more >><\/a><\/p>\n","protected":false},"author":87,"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\/10821"}],"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\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=10821"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10821\/revisions"}],"predecessor-version":[{"id":10825,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10821\/revisions\/10825"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=10821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=10821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=10821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}