{"id":8304,"date":"2017-01-06T09:00:14","date_gmt":"2017-01-06T14:00:14","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=8304"},"modified":"2018-07-25T13:19:49","modified_gmt":"2018-07-25T17:19:49","slug":"the-ideal-gas-law-data-and-footballs","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2017\/01\/06\/the-ideal-gas-law-data-and-footballs\/","title":{"rendered":"The Ideal Gas Law, Data, and Footballs"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\n   <introduction><\/p>\n<p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495\">Sean<\/a>&#8216;s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/60531-the-ideal-gas-law--data--and-footballs\">The Ideal Gas Law, Data, and Footballs<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/684902\">Daniel Frey<\/a>.\n      <\/p>\n<p>   <\/introduction><\/p>\n<p>With the New England Patriots sitting on top of the AFC, looking forward to a bye week, and home field advantage through the playoffs, I think it&#8217;s time for another football related pick of the week.  This one is a <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/matlab_prog\/what-is-a-live-script-or-function.html\">live script<\/a> that shows the use of statistics and the ideal gas law to attempt to explain what happened during AFC Championship in 2015 when the team was accused of tampering with the footballs.\n   <\/p>\n<p>I really like the way Daniel has used the live script as a way to teach a lesson.  Just like in the <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/matlab_prog\/what-is-a-live-script-or-function.html\">documentation example<\/a> (scroll down to <b>Create interactive lectures for teaching<\/b>), he has done some of the calculations, and then left open ended questions for students to fill in with either text or code.  Students could then return the document so he can run it.\n   <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainPatriotsIdealGasLaw\/2017-01-03_10-55-44.png\"> <\/p>\n<p>During the first semester I TA&#8217;d MATLAB, the instructor was having everyone turn on the <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/diary.html\">diary<\/a>, doing all of the calculations (with semicolons off!), and then saving the diary output.  This meant there were no graphics, plain text only, and all typos showed up making the diaries really long, and hard to digest.  The workflow with the Live Script is a big improvement in every way.\n   <\/p>\n<p>If you teach with MATLAB, how do you have students hand in course work? Live scripts could be a good approach to look at as well as <a href=\"https:\/\/www.mathworks.com\/products\/matlab-grader.html\">MATLAB Grader<\/a> for autograding, borrowing or sharing problems with others, and integrating with your learning management systems.\n   <\/p>\n<p>Now if you&#8217;re less interested in teaching and more interested in football, also be sure to check out this <a href=\"https:\/\/blogs.mathworks.com\/simulink\/2015\/01\/27\/simuflate\/\">blog post<\/a> from 2015 that uses Simulink to simulate the pressure changes over the game.\n   <\/p>\n<h3>Comments<a name=\"2\"><\/a><\/h3>\n<p>Give it a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=8304#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/60531-the-ideal-gas-law--data--and-footballs#comments\">comment<\/a> for Daniel.\n   <\/p>\n<p><script language=\"JavaScript\">\n<!--\n\n    function grabCode_1efa604c677f478dbb2b1e820e1bcb60() {\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='1efa604c677f478dbb2b1e820e1bcb60 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 1efa604c677f478dbb2b1e820e1bcb60';\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 2017 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_1efa604c677f478dbb2b1e820e1bcb60()\"><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; R2017a<\/p>\n<\/div>\n<p><!--\n1efa604c677f478dbb2b1e820e1bcb60 ##### SOURCE BEGIN #####\n%% The Ideal Gas Law, Data, and Footballs\n%\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495 Sean>'s pick this week is\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/60531-the-ideal-gas-law--data--and-footballs The Ideal Gas Law, Data, and Footballs> by\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/684902 Daniel Frey>.\n% \n\n%% \n% With the New England Patriots sitting on top of the AFC, looking\n% forward to a bye week, and home field advantage through the playoffs, I\n% think it's time for another football related pick of the week.  This one\n% is a\n% <https:\/\/mathworks.com\/help\/matlab\/matlab_prog\/what-is-a-live-script.html\n% live script> that shows the use of statistics and the ideal gas law to\n% attempt to explain what happened during AFC Championship in 2015 when the\n% team was accused of tampering with the footballs.\n%\n% I really like the way Daniel has used the live script as a way to teach a\n% lesson.  Just like in the\n% <<https:\/\/mathworks.com\/help\/matlab\/matlab_prog\/what-is-a-live-script.html\n% documentation example> (scroll down to *Create interactive lectures for\n% teaching*), he has done some of the calculations, and then left open\n% ended questions for students to fill in with either text or code.\n% Students could then return the document so he can run it.  \n%\n% <<2017-01-03_10-55-44.png>>\n%\n% During the first semester I TA'd MATLAB, the instructor was having\n% everyone turn on the <https:\/\/mathworks.com\/help\/matlab\/ref\/diary.html\n% diary>, doing all of the calculations (with semicolons off!), and then\n% saving the diary output.  This meant there were no graphics, plain text\n% only, and all typos showed up making the diaries really long, and\n% hard to digest.  The workflow with the Live Script is a big improvement\n% in every way.\n%\n% If you teach with MATLAB, how do you have students hand in course work?\n% Live scripts could be a good approach to look at as well as\n% <https:\/\/www.mathworks.com\/products\/matlab-grader.html MATLAB Grader> for autograding, borrowing or % sharing problems with others, and integrating with your learning management systems.\n%\n% Now if you're less interested in teaching and more interested in\n% football, also be sure to check out this\n% <https:\/\/blogs.mathworks.com\/simulink\/2015\/01\/27\/simuflate\/ blog post>\n% from 2015 that uses Simulink to simulate the pressure changes over the\n% game.\n\n%% Comments\n% \n% Give it a try and let us know what you think\n% <https:\/\/blogs.mathworks.com\/pick\/?p=8304#respond here> or leave a\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/60531-the-ideal-gas-law--data--and-footballs#comments\n% comment> for Daniel.\n##### SOURCE END ##### 1efa604c677f478dbb2b1e820e1bcb60\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainPatriotsIdealGasLaw\/2017-01-03_10-55-44.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>Sean&#8216;s pick this week is The Ideal Gas Law, Data, and Footballs by Daniel Frey.<\/p>\n<p>With the New England Patriots sitting on top of the AFC, looking forward to a bye week, and home&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2017\/01\/06\/the-ideal-gas-law-data-and-footballs\/\">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\/8304"}],"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=8304"}],"version-history":[{"count":8,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/8304\/revisions"}],"predecessor-version":[{"id":9963,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/8304\/revisions\/9963"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=8304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=8304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=8304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}