Loren on the Art of MATLAB

January 26th, 2009

Opportunity to Hunt for MathWorks Swag

Have you ever gotten involved in geocaching? Have you ever wanted a MathWorks laser pointer / flashlight? You have a chance of combining both of these interests if you happen to be near the Los Angeles (used to incorrectly say Bay) area in California.

Sam Mirsky has posted the challenge to the MATLAB newsgroup.

Here's a couple of pictures of the swag from my phone camera.

I1 = imread('laser1.jpg');
I2 = imread('laser2.jpg');
whos
  Name        Size                  Bytes  Class    Attributes

  I1        960x1280x3            3686400  uint8              
  I2        960x1280x3            3686400  uint8              
  J1        240x320x3              230400  uint8              
  J2        240x320x3              230400  uint8              

Let me downsample the pictures to display in the blog using imresize from Image Processing Toolbox. You can a learn more about image processing on Steve's blog.

J1 = imresize(I1,.25);
imshow(J1)
J2 = imresize(I2,.25);
imshow(J2)

Don't forget the hint: Underground, but not buried, in a round hole. If you find it, in addition to returning the code to Sam, can you please post here? Have fun!


Get the MATLAB code

Published with MATLAB® 7.7

3 Responses to “Opportunity to Hunt for MathWorks Swag”

  1. Sam Mirsky replied on :

    Hi Loren, thanks for highlighting my hide.

    As a correction, it is hidden in Los Angeles (near LAX) not in the Bay Area.

  2. Tony Kelman replied on :

    I found the first laser pointer led flashlight near LAX last night. If anyone else from LA goes looking for it, at least you can eat at In-N-Out and watch the planes land.

  3. Loren replied on :

    Tony-

    Thanks for hunting!

    And Sam, let’s work on stashing some goodies elsewhere. Talk to you at work.

    –Loren

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Loren Shure works on design of the MATLAB language at The MathWorks. She writes here about once a week on MATLAB programming and related topics.

  • Jun: I totally can not believe it, Loren. You are really helpful. Thank you so much, MATLAB master!
  • Loren: Wow folks- Always lots of interest when there’s a quickie to try out! I will only make 2 general...
  • Loren: Jun- ismember is your friend here: >> [aa,ind] = ismember(Array2,Arra y1) aa = 1 1 1 1 1 1 1 ind = 1 2 1 4 4 3...
  • Dan: I like the first way better than the second way. Combining the arrays into one and running any is nice, although...
  • James Myatt: How about I = (a == 0 | b == 0); a(I) = []; b(I) = [];
  • Tunc: Hello Loren, love your blog because of such inspiring and challenging comments to such ’small’...
  • Pekka Kumpulainen: Here is my tradeoff. I usually want to keep the original variables as they are most probably...
  • Iain: Followup: Of course, to allow NaNs (counting them as non-zero): mask = (a~=0) & (b~=0); The mask says “a...
  • Matt Fig: I would usually go with something like this: y = a&b; x = a(y); y = b(y); But I was surprised to find...
  • kk: c=all([a;b]) a(c) a(b)

These postings are the author's and don't necessarily represent the opinions of The MathWorks.