Yesterday was easter day. So, I would like to say Happy Easter 2011 for all of you who were celebrating it.
Speaking of easter, yesterday, I found out another MATLAB’s easter eggs from a post in MATLAB’s facebook page. It was in Mathworks forum. Since I have a post about MATLAB easter’s egg before, I thought I should also post this in my blog for the sake of completeness:D. So, here is some more of MATLAB’s easter egg:
- Type surf(membrane) in your command to create 3D plot of MATLAB’s logo.
- Type xpbombs in your command window to begin a GUI game of minesweeper.
- Type fifteen in your command window to begin a GUI game of panel swapping.
The thing that I hated is that it turns out that the MATLAB programmer has already built a minesweeper game silently (Easter egg no 2). If your are following my blog, maybe you know that I created a game of minesweeper in MATLAB a few months back. Because it (the minesweeper game) is already included in MATLAB, I suddenly feel that I wasted my time building my minesweeper game (hiks:/).
I once had the same mistake. At my early days of learning MATLAB, I created a m-file to calculate international standard atmosphere (ISA) properties. After spending one week creating the code, I found out that MATLAB already has a built-in function, atmosisa, to calculate international standard atmosphere (ISA) properties. And then I was regretting myself and I swore that when I want to make a function, I have to make sure that MATLAB does not have a built-in function for it. And it turns out that I’ve repeated the same mistake:/.
Anyway, the moral of my story is when you want to create a function, check MATLAB’s documentation first. If MATLAB already has a built-in function for it, don’t bother creating new m-files. Happy Easter, Guys…