{"id":2590,"date":"2010-09-03T13:07:07","date_gmt":"2010-09-03T13:07:07","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2010\/09\/03\/two-amigos\/"},"modified":"2017-05-12T13:31:06","modified_gmt":"2017-05-12T17:31:06","slug":"two-amigos","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2010\/09\/03\/two-amigos\/","title":{"rendered":"Two Amigos?"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction><\/introduction>\r\n   <p><a href=\"https:\/\/blogs.mathworks.com\/pick\/2010\/08\/27\/a-tribute-to-our-friend-and-colleague\/\">Last week<\/a>, we bade adieu to <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021\">Bob Bemis<\/a> --our long-time collaborator on the Pick of the Week blog. We've had the same thumbnail image associated with this blog for\r\n      a couple years now; in fact, we've affectionately referred to the picture as \"the three amigos.\" In the short term, at least,\r\n      there will be only two of us-- <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911\">Brett<\/a> and <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\">Jiro<\/a> --writing this blog. Clearly, our thumbnail picture is not going to be appropriate moving forward.\r\n   <\/p>\r\n   <p>So today, in lieu of a Pick, Jiro and I would like to issue a challenge to all of our image-processing-capable friends: using\r\n      ONLY MATLAB and MathWorks tools, write a bit of code to modify the Pick of the Week image and create a \"two amigos\" photograph,\r\n      containing only Brett and Jiro. (Bob is the one in the middle.)\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/pick\/..\/images\/pick\/threeamigos_small.png\"> <\/p>\r\n\r\n   <p>We will award two prizes for this competition: one for the person whose code results in the best usable Bob-free image, and\r\n      one for the person with the most creative approach to solving the problem.\r\n   <\/p>\r\n   <p>Some ground rules: use only MathWorks' tools\/code. MATLAB, Simulink, Toolboxes, and Blocksets are all fair game. Any code\r\n      downloaded from the MATLAB Central File Exchange is fair game. Anything created using exclusively MathWorks' tool is fair\r\n      game. Using Photoshop? Not allowed!\r\n   <\/p>\r\n   <p>Email all entries (CODE ONLY--no images!), with the subject \"Two Amigos Competition\", to me at:<\/p>\r\n   <p><tt>char(cumsum([98 16 -13 15 0 -70 69 -11 7 -10 7 7 -4 -1 -46 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2]))<\/tt><\/p>\r\n   <p>(There should be no line wrap in the preceding line.)<\/p>\r\n   <p>Enter as many times as you'd like. The deadline for submissions is midnight, Friday, October 1. Jiro and I will evaluate all\r\n      entries and decide jointly who wins, and our decision will be deemed final!\r\n   <\/p>\r\n   <p>Good luck, and happy MATLABbing!<\/p>\r\n   <p><a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2590#respond\"> Comments?<\/a><\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_69556d71f8424f40b1c3044f1c8edd20() {\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='69556d71f8424f40b1c3044f1c8edd20 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 69556d71f8424f40b1c3044f1c8edd20';\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 = 'Brett Shoelson';\r\n        copyright = 'Copyright 2010 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_69556d71f8424f40b1c3044f1c8edd20()\"><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.10<br><\/p>\r\n<\/div>\r\n<!--\r\n69556d71f8424f40b1c3044f1c8edd20 ##### SOURCE BEGIN #####\r\n%% Two Amigos?\r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/2010\/08\/27\/a-tribute-to-our-friend-and-colleague\/ Last week>,\r\n% we bade adieu to <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021 Bob Bemis>\r\n% REPLACE_WITH_DASH_DASHour long-time collaborator on the Pick of the Week blog.\r\n% We've had the same thumbnail image associated with this blog for a couple\r\n% years now; in fact, we've affectionately referred to the picture as \"the\r\n% three amigos.\" In the short term, at least, there will be only two of\r\n% usREPLACE_WITH_DASH_DASH <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911 Brett> and \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007 Jiro>\r\n% REPLACE_WITH_DASH_DASHwriting this blog. Clearly, our thumbnail picture is\r\n% not going to be appropriate moving forward.\r\n\r\n%%\r\n% So today, in lieu of a Pick, Jiro and I would like to issue a challenge to all of our\r\n% image-processing-capable friends: using ONLY MATLAB and MathWorks tools,\r\n% write a bit of code to modify the Pick of the Week image and create a\r\n% \"two amigos\" photograph, containing only Brett and Jiro. (Bob is the one\r\n% in the middle.)\r\n\r\n%%\r\n% \r\n% <<https:\/\/blogs.mathworks.com\/pick\/..\/images\/pick\/threeamigos_small.png>>\r\n% \r\n\r\n%%\r\n% You can get the photo by clicking on the link below; that will link to\r\n% our FTP server, where the image will be available for the next thirty days: \r\n%\r\n% \r\n\r\n%%\r\n% We will award two prizes for this competition: one for the person whose\r\n% code results in the best usable Bob-free image, and one for the person\r\n% with the most creative approach to solving the problem.\r\n\r\n%%\r\n% Some ground rules: use only MathWorks' tools\/code. MATLAB, Simulink,\r\n% Toolboxes, and Blocksets are all fair game. Any code downloaded from the\r\n% MATLAB Central File Exchange is fair game. Anything created using\r\n% exclusively MathWorks' tool is fair game. Using Photoshop? Not allowed!\r\n%\r\n% Email all entries (CODE ONLYREPLACE_WITH_DASH_DASHno images!), with the subject \"Two Amigos Competition\", to me at:\r\n%%\r\n% |char(cumsum([98 16 -13 15 0 -70 69 -11 7 -10 7 7 -4 -1 -46 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2]))|\r\n\r\n%%\r\n% (There should be no line wrap in the preceding line.)\r\n\r\n%%\r\n% Enter as many times as you'd like. The deadline for submissions is\r\n% midnight, Friday, October 1. Jiro and I will evaluate all entries and\r\n% decide jointly who wins, and our decision will be deemed final!\r\n\r\n%%\r\n% Good luck, and happy MATLABbing!\r\n%\r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2590#respond  Comments?>\r\n\r\n##### SOURCE END ##### 69556d71f8424f40b1c3044f1c8edd20\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n   Last week, we bade adieu to Bob Bemis --our long-time collaborator on the Pick of the Week blog. We've had the same thumbnail image associated with this blog for\r\n      a couple years now;... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2010\/09\/03\/two-amigos\/\">read more >><\/a><\/p>","protected":false},"author":34,"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\/2590"}],"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\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2590"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2590\/revisions"}],"predecessor-version":[{"id":8595,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2590\/revisions\/8595"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}