{"id":503,"date":"2011-11-21T15:55:20","date_gmt":"2011-11-21T15:55:20","guid":{"rendered":"https:\/\/blogs.mathworks.com\/desktop\/2011\/11\/21\/4-uses-of-matlab-mobile-this-thanksgiving\/"},"modified":"2019-11-21T13:43:10","modified_gmt":"2019-11-21T18:43:10","slug":"4-uses-of-matlab-mobile-this-thanksgiving","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2011\/11\/21\/4-uses-of-matlab-mobile-this-thanksgiving\/","title":{"rendered":"4 Uses of MATLAB Mobile This Thanksgiving"},"content":{"rendered":"<p><strong>1. Chef Aide<\/strong><br \/>\nWhen cooking a large meal, I often need to make quick calculations and substitutions. For instance, how to handle measuring when all my tablespoons are in the sink? After pre-loading the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/29621-units-conversion-toolbox\">Units Conversion Toolbox<\/a> from the file exchange into MATLAB, I can figure out a workaround lickety-split:<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/1_Unit.png\"><img decoding=\"async\" loading=\"lazy\" width=\"473\" height=\"1024\" class=\"aligncenter size-large wp-image-6809\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/1_Unit-473x1024.png\" alt=\"\" \/><\/a><\/p>\n<div align=\"center\"><\/div>\n<div align=\"center\"><\/div>\n<div align=\"center\"><\/div>\n<p>Sure there are plenty of apps that will do this easier and out of the box, but that&#8217;s not as much fun as using MATLAB.<\/p>\n<p><strong>2. Black Friday Deal Calculator<\/strong><br \/>\nHow do you know how much are you going to save on a deal? In addition to all the powerful linear algebra built into MATLAB, it can also function as basic calculator. You can use MATLAB Mobile to calculate final prices, how much it will cost to drive across town to save an additional $10 on the same item, etc.<\/p>\n<div align=\"center\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/2_Black_Friday_Deal_Calculator.png\"><img decoding=\"async\" loading=\"lazy\" width=\"473\" height=\"1024\" class=\"aligncenter size-large wp-image-6811\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/2_Black_Friday_Deal_Calculator-473x1024.png\" alt=\"\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p><strong>3. Winning the football pool<\/strong><br \/>\nWith a little matrix manipulation and pre-computed probabilities, we can find out which boxes in a standard football pool have the best odds of winning. This is for the kind where you choose a square representing the last digit of the two teams&#8217; scores. Thanks to the data from <a href=\"\"><\/a>, we can figure which square has the best odds:<\/p>\n<div align=\"center\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/3_Football_Pool.png\"><img decoding=\"async\" loading=\"lazy\" width=\"473\" height=\"1024\" class=\"aligncenter size-large wp-image-6813\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/3_Football_Pool-473x1024.png\" alt=\"\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p>Here&#8217;s the code if you want to cut &amp; paste. Special thanks to Ned Gulley for inspiring this one.<\/p>\n<pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid #c8c8c8;\">prob = [1.7100 1.4800 0.5600 3.2100 2.0400 0.7200 1.5400 3.8000 0.9500 0.7400; <span style=\"color: #0000ff;\">...<\/span>\r\n 1.4800 0.8500 0.3300 1.0000 2.2300 0.2400 0.9500 1.9300 1.3500 0.5600;<span style=\"color: #0000ff;\">...<\/span>\r\n 0.5600 0.3300 0.0400 0.5400 0.6500 0.3300 0.3500 0.4600 0.2200 0.3200;<span style=\"color: #0000ff;\">...<\/span>\r\n 3.2100 1.0000 0.5400 1.1900 1.4500 0.5200 1.6300 1.9300 0.6100 0.7200;<span style=\"color: #0000ff;\">...<\/span>\r\n 2.0400 2.2300 0.6500 1.4500 1.5900 0.5000 0.8200 3.7100 0.7200 0.6700;<span style=\"color: #0000ff;\">...<\/span>\r\n 0.7200 0.2400 0.3300 0.5200 0.5000 0.1900 0.2200 0.7600 0.6900 0.2400;<span style=\"color: #0000ff;\">...<\/span>\r\n 1.5400 0.9500 0.3500 1.6300 0.8200 0.2200 0.5600 0.8900 0.4800 0.6900;<span style=\"color: #0000ff;\">...<\/span>\r\n 3.8000 1.9300 0.4600 1.9300 3.7100 0.7600 0.8900 1.9300 0.8300 0.8000;<span style=\"color: #0000ff;\">...<\/span>\r\n 0.9500 1.3500 0.2200 0.6100 0.7200 0.6900 0.4800 0.8300 0.4100 0.3000;<span style=\"color: #0000ff;\">...<\/span>\r\n 0.7400 0.5600 0.3200 0.7200 0.6700 0.2400 0.6900 0.8000 0.3000 0.1900];\r\n\r\n[~,IX] = sort(prob(:),<span style=\"color: #a020f0;\">'descend'<\/span>);\r\n[row,col]=ind2sub(size(prob),IX);\r\nbestscores = horzcat(row-1,col-1)<\/pre>\n<p><strong>4. A Reason To Be Thankful<\/strong><br \/>\nSome families&#8217; tradition includes everyone stating a reason to be thankful. In addition to a thoughtful and inspired answer, why not throw out a joke one as well. The <tt>why<\/tt> function is always good for coming up with an answer on the spot.<\/p>\n<div align=\"center\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/5_2_Why.png\"><img decoding=\"async\" loading=\"lazy\" width=\"473\" height=\"1024\" class=\"aligncenter size-large wp-image-6807\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/5_2_Why-473x1024.png\" alt=\"\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p>Have a safe and happy Thanksgiving.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Chef Aide<br \/>\nWhen cooking a large meal, I often need to make quick calculations and substitutions. For instance, how to handle measuring when all my tablespoons are in the sink? After pre-loading the&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2011\/11\/21\/4-uses-of-matlab-mobile-this-thanksgiving\/\">read more >><\/a><\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[54],"tags":[181,179,78,180],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/503"}],"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\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"predecessor-version":[{"id":6817,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/503\/revisions\/6817"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}