{"id":169,"date":"2009-01-26T15:43:08","date_gmt":"2009-01-26T15:43:08","guid":{"rendered":"https:\/\/blogs.mathworks.com\/loren\/2009\/01\/26\/opportunity-to-hunt-for-mathworks-swag\/"},"modified":"2018-01-08T15:12:39","modified_gmt":"2018-01-08T20:12:39","slug":"opportunity-to-hunt-for-mathworks-swag","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/loren\/2009\/01\/26\/opportunity-to-hunt-for-mathworks-swag\/","title":{"rendered":"Opportunity to Hunt for MathWorks Swag"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p>Have you ever gotten involved in geocaching?  Have you ever wanted a MathWorks laser pointer \/ flashlight?  You have a chance\r\n         of combining both of these interests if you happen to be near the Los Angeles (used to incorrectly say Bay) area in California.\r\n      <\/p>\r\n   <\/introduction>\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/31589\">Sam Mirsky<\/a> has posted the challenge to the <a>MATLAB newsgroup<\/a>.\r\n   <\/p>\r\n   <p>Here's a couple of pictures of the swag from my phone camera.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">I1 = imread(<span style=\"color: #A020F0\">'laser1.jpg'<\/span>);\r\nI2 = imread(<span style=\"color: #A020F0\">'laser2.jpg'<\/span>);\r\nwhos<\/pre><pre style=\"font-style:oblique\">  Name        Size                  Bytes  Class    Attributes\r\n\r\n  I1        960x1280x3            3686400  uint8              \r\n  I2        960x1280x3            3686400  uint8              \r\n  J1        240x320x3              230400  uint8              \r\n  J2        240x320x3              230400  uint8              \r\n\r\n<\/pre><p>Let me downsample the pictures to display in the blog using <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2008b\/toolbox\/images\/imresize.html\"><tt>imresize<\/tt><\/a> from <a href=\"https:\/\/www.mathworks.com\/products\/image\/\">Image Processing Toolbox<\/a>. You can a learn more about image processing on <a href=\"https:\/\/blogs.mathworks.com\/steve\">Steve's blog<\/a>.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">J1 = imresize(I1,.25);\r\nimshow(J1)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/169\/swag_01.png\"> <pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">J2 = imresize(I2,.25);\r\nimshow(J2)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/169\/swag_02.png\"> <p>Don't forget the hint: <i>Underground, but not buried, in a round hole<\/i>. If you find it, in addition to returning the code to Sam, can you please post <a href=\"https:\/\/blogs.mathworks.com\/loren\/?p=169#respond\">here<\/a>?  Have fun!\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_3365c367d726409984d42f95db01c2d6() {\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='3365c367d726409984d42f95db01c2d6 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 3365c367d726409984d42f95db01c2d6';\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        author = 'Loren Shure';\r\n        copyright = 'Copyright 2009 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 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');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \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_3365c367d726409984d42f95db01c2d6()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.7<br><\/p>\r\n<\/div>\r\n<!--\r\n3365c367d726409984d42f95db01c2d6 ##### SOURCE BEGIN #####\r\n%% Opportunity to Hunt for MathWorks Swag\r\n% Have you ever gotten involved in geocaching?  Have you ever wanted a\r\n% MathWorks laser pointer \/ flashlight?  You have a chance of combining\r\n% both of these interests if you happen to be near the Bay area in\r\n% California. \r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/31589 Sam Mirsky>\r\n% has posted the challenge to the \r\n% <http:\/\/view_thread\/242873#623115 MATLAB newsgroup>.\r\n%%\r\n% Here's a couple of pictures of the swag from my phone camera.\r\nI1 = imread('laser1.jpg');\r\nI2 = imread('laser2.jpg');\r\nwhos\r\n%%\r\n% Let me downsample the pictures to display in the blog using \r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2008b\/toolbox\/images\/imresize.html |imresize|>\r\n% from <https:\/\/www.mathworks.com\/products\/image\/ Image Processing Toolbox>.\r\n% You can a learn more about image processing on\r\n% <https:\/\/blogs.mathworks.com\/steve Steve's blog>.\r\nJ1 = imresize(I1,.25);\r\nimshow(J1)\r\n%%\r\nJ2 = imresize(I2,.25);\r\nimshow(J2)\r\n%%\r\n% Don't forget the hint: _Underground, but not buried, in a round hole_.\r\n% If you find it, in addition to returning the code to Sam, can you please\r\n% post <https:\/\/blogs.mathworks.com\/loren\/?p=169#respond here>?  Have fun!\r\n##### SOURCE END ##### 3365c367d726409984d42f95db01c2d6\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n      Have you ever gotten involved in geocaching?  Have you ever wanted a MathWorks laser pointer \/ flashlight?  You have a chance\r\n         of combining both of these interests if you happen... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/loren\/2009\/01\/26\/opportunity-to-hunt-for-mathworks-swag\/\">read more >><\/a><\/p>","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/169"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":2544,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/169\/revisions\/2544"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}