{"id":11842,"date":"2020-11-20T09:00:52","date_gmt":"2020-11-20T14:00:52","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=11842"},"modified":"2020-12-10T17:34:19","modified_gmt":"2020-12-10T22:34:19","slug":"emulating-a-physical-experiment-of-measuring-mms","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2020\/11\/20\/emulating-a-physical-experiment-of-measuring-mms\/","title":{"rendered":"Emulating a physical experiment of measuring M&#038;M&#8217;s"},"content":{"rendered":"<div class=\"content\"><p><a href=\"http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869871\">Jiro<\/a>'s Pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/79586\">M&amp;M statistics<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/7620540\">Lisa R. Thompson<\/a>.<\/p><p>A common challenge I hear from educators is how to conduct courses that involve experiments or some sort of hardware interactions during this pandemic. If students are not able to be present in the classroom where the instruments are then you may need to become creative in how you teach. We have nice page that summarizes various solutions for your <a href=\"https:\/\/www.mathworks.com\/academia\/online-teaching\/virtual-labs.html\">virtual labs<\/a>, and there's also a blog post on Loren's Blog about <a href=\"https:\/\/blogs.mathworks.com\/loren\/2020\/09\/02\/tips-for-moving-your-lab-based-classes-online\/\">moving your lab-based classes online<\/a>. I won't repeat the information in those pages, but here are a few approaches to replacing hardware-based courses.<\/p><div><ul><li>Replacing physical experiments with simulations<\/li><li>Incorporating low-cost hardware, such as Arduinos or mobile phones to have students do experiments at home<\/li><li>Remotely accessing and controlling hardware that's on campus<\/li><\/ul><\/div><p>This entry by Lisa is an app that <em>emulates<\/em> a real experiment. It lets students \"investigate the statistics of random normal sampling using M&amp;M candies.\" I'm impressed with the level of detail that this app has with respect to a real experiment.<\/p><div><ul><li>You can choose from 4 different scales, each having different readabilities (resolution)<\/li><li>The M&amp;M samples (color and mass) are drawn from a distribution based on a real bag of M&amp;Ms<\/li><li>Repeated measure noise is taken into account for each scale, taken from actual data or equipment specs<\/li><li>Idle random noise is added to emulate the jitter. I must admit, I had kick out of this, when I saw the scale reading change from time to time. Lisa uses a timer object to add the random noise every several seconds.<\/li><li>Measurements can be recorded in output to an Excel file<\/li><\/ul><\/div><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_MM_Stats\/m_m_app.gif\" alt=\"\"> <\/p><p><b>Comments<\/b><\/p><p>Give it a try and let us know what you think <a href=\"http:\/\/blogs.mathworks.com\/pick\/?p=11842#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/79586#comment\">comment<\/a> for Lisa.<\/p><p>Also, if you have other examples of virtual experiments, please tell us about it <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/discussions\/distance-learning\/new?s_tid=topiccom_distance_learning_disc_start-btn_home\">here<\/a> at our <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/topics\/distance-learning.html?q=&amp;page=1\">Distance Learning Community<\/a>.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_378e33bb75374cae8bff9de764abdc6b() {\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='378e33bb75374cae8bff9de764abdc6b ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 378e33bb75374cae8bff9de764abdc6b';\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        copyright = 'Copyright 2020 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 copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\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     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_378e33bb75374cae8bff9de764abdc6b()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2020b<br><\/p><p class=\"footer\"><br>\r\n      Published with MATLAB&reg; R2020b<br><\/p><\/div><!--\r\n378e33bb75374cae8bff9de764abdc6b ##### SOURCE BEGIN #####\r\n%%\r\n% <http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869871 Jiro>'s\r\n% Pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/79586 M&M\r\n% statistics> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/7620540 Lisa R.\r\n% Thompson>.\r\n%\r\n% A common challenge I hear from educators is how to conduct courses that\r\n% involve experiments or some sort of hardware interactions during this\r\n% pandemic. If students are not able to be present in the classroom where\r\n% the instruments are then you may need to become creative in how you\r\n% teach. We have nice page that summarizes various solutions for your\r\n% <https:\/\/www.mathworks.com\/academia\/online-teaching\/virtual-labs.html\r\n% virtual labs>, and there's also a blog post on Loren's Blog about\r\n% <https:\/\/blogs.mathworks.com\/loren\/2020\/09\/02\/tips-for-moving-your-lab-based-classes-online\/\r\n% moving your lab-based classes online>. I won't repeat the information in\r\n% those pages, but here are a few approaches to replacing hardware-based\r\n% courses.\r\n%\r\n% * Replacing physical experiments with simulations\r\n% * Incorporating low-cost hardware, such as Arduinos or mobile phones to\r\n% have students do experiments at home\r\n% * Remotely accessing and controlling hardware that's on campus\r\n%\r\n% This entry by Lisa is an app that _emulates_ a real experiment. It lets\r\n% students \"investigate the statistics of random normal sampling using M&M\r\n% candies.\" I'm impressed with the level of detail that this app has with\r\n% respect to a real experiment.\r\n%\r\n% * You can choose from 4 different scales, each having different\r\n% readabilities (resolution)\r\n% * The M&M samples (color and mass) are drawn from a distribution based\r\n% on a real bag of M&Ms\r\n% * Repeated measure noise is taken into account for each scale, taken from\r\n% actual data or equipment specs\r\n% * Idle random noise is added to emulate the jitter. I must admit, I had\r\n% kick out of this, when I saw the scale reading change from time to time.\r\n% Lisa uses a timer object to add the random noise every several seconds.\r\n% * Measurements can be recorded in output to an Excel file\r\n%\r\n% <<m_m_app.gif>>\r\n%\r\n% *Comments*\r\n%\r\n% Give it a try and let us know what you think\r\n% <http:\/\/blogs.mathworks.com\/pick\/?p=11842#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/79586#comment\r\n% comment> for Lisa.\r\n%\r\n% Also, if you have other examples of virtual experiments, please tell us\r\n% about it\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/discussions\/distance-learning\/new?s_tid=topiccom_distance_learning_disc_start-btn_home\r\n% here> at our\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/topics\/distance-learning.html?q=&page=1\r\n% Distance Learning Community>.\r\n\r\n##### SOURCE END ##### 378e33bb75374cae8bff9de764abdc6b\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_MM_Stats\/m_m_app.gif\" onError=\"this.style.display ='none';\" \/><\/div><p>Jiro's Pick this week is M&amp;M statistics by Lisa R. Thompson.A common challenge I hear from educators is how to conduct courses that involve experiments or some sort of hardware interactions... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2020\/11\/20\/emulating-a-physical-experiment-of-measuring-mms\/\">read more >><\/a><\/p>","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,37,16,6],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/11842"}],"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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=11842"}],"version-history":[{"count":4,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/11842\/revisions"}],"predecessor-version":[{"id":11850,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/11842\/revisions\/11850"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=11842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=11842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=11842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}