Please post the easter eggs that you have found so far if they aren't already posted by someone else.
Let's try to make a good Matlab easter egg list because it seems that there isn't one.
What should be posted:
What shouldn't be posted:
As Steve discussed in one of his blog posts, the default image in MATLAB is actually a steganographic image:
image

Just looks like an upside-down little boy, right? Well, if you rotate the 53-bits of the double precision fraction component so that each becomes the highest valued bit, you can easily see the hidden images:

Here's how I made the above image:
defImage = pow2(get(0,'DefaultImageCData'),47);
imgCell = repmat({zeros(size(defImage))},8,7);
for shift = 0:52
imgCell{shift+1} = bitrotate(defImage,shift);
end;
allImages = cell2mat(imgCell.');
imshow(allImages,[min(allImages(:)) max(allImages(:))]);
NOTE: bitrotate is a version of the built-in bitshift that I wrote to perform a circular shift of the bit pattern instead of discarding bits that overflow. I'll be placing bitrotate on the FEX soon, but for now you can just replace it with bitshift in the above code.
The spy function without arguments makes a cool figure (my current avatar).
The why function says random things.
Matlab comes with a great sound clip for those moments when you find a solution for a huge problem
load handel sound(y,Fs)
The pie function (matlab 2008b and maybe later versions) doesn't allow to place the labels in a specific place but in the function code there's a variable that allows the text to be inside the pie and you might also set the distance from the center of the pie, here's a little hack that I did to pie
I wrote two functions:
lala.m
and lalala.m
lala displays: "stop singing and get back to work"
and lalala sounds handel. It makes for fun giving those to others in the lab.
Hey Sean that's good fun but I wonder if the nice people from mathworks did include something similar but no one found it yet, are they forbid to do that?
Paulo, your avatar is no longer the "spy" image that pops up - it's Sean's dog (I think). Sean's lalala function is not in R2011b - maybe it will come out in R2012a.
This site and this site have several Easter eggs, but most don't work on 2010b. Just these work for me:
image penny shower
But are these really Easter eggs or just demos?
Oh, but there is so much more to image than meets the eye!! Let's see who can find what else is hidden there :)
Hi Scott, without being able to see the code for image it's not easy :(
Paulo, search Steve Eddin's Blog for 'image function' (or similar). There is quite a lot to learn there!
Today I found that these functions:
step
impulse
From the Control System Toolbox work without any arguments, there's a sort of demo that they make, very nice, I was using them for years without noticing, nice surprise, wonder why the tf function doesn't also have the same behaviour
surf(membrane) gives mathworks logo
imagesc(cool) gives the cool colors
imagesc(hot)
Not sure if they qualify as Easter eggs, but type these on the command line (verified on R2011b):
On http://www.walkingrandomly.com/?p=2949, Cleve says " As our code base has increased, including such goodies in the MATLAB core has become problematic because of the strain it puts on rigorous automated testing. It is still possible to include them in a few “leaf” M functions, like “spy”, that other functions do not depend upon." so they will probably be fewer as time goes on.
7 Comments
Direct link to this comment:
http://www.mathworks.nl/matlabcentral/answers/2001#comment_3863
Unanswerable...Grr
Direct link to this comment:
http://www.mathworks.nl/matlabcentral/answers/2001#comment_3865
I'm taking advantage of the current problem with the answers system
play('DrEvilsLaughing',8192)
Direct link to this comment:
http://www.mathworks.nl/matlabcentral/answers/2001#comment_3869
I am unfamiliar with what you mean by "Easter Egg." But if it means an unexpected, nice surprise, then finding out that FINDSTR takes non-string arguments was a nice surprise to me:
I = findstr(round(rand(1,10000)),[1 1 0 0 1 1 0 0])
Direct link to this comment:
http://www.mathworks.nl/matlabcentral/answers/2001#comment_3871
unexpected things are also welcome to the list :)
Direct link to this comment:
http://www.mathworks.nl/matlabcentral/answers/2001#comment_147822
Ok so here's a list of ones I've found. Some of these ARE Emulators, but I figure most will appreciate them anyway. (A lot of the above posts are random programs associated with emulators and gui's anyway.)
Direct link to this comment:
http://www.mathworks.nl/matlabcentral/answers/2001#comment_147826
Technically all of these are visible code you can look up and manipulate, so I'm not sure these count as Easter Eggs, but whatever. They're still pretty cool.
Forgot a couple, too.
That last one plays some random rock band music
ENJOY!!
Direct link to this comment:
http://www.mathworks.nl/matlabcentral/answers/2001#comment_147828
@David, nice!