Some MATLAB Unusual Commands, That You Must Know ( Just For Fun! ) Part 2

Yes, MATLAB is also having sense of HUMOR. And, there are many commands in MATLAB, that their programmer left for the users to find, that may be to fulfill their need of enjoyment. Yes, they also know & would have felt while programming the MATLAB software, that sometime programming becomes really creepy & its very hectic for the programmer to get it through. If the desired result is not coming, programmers tends to get frustrated by seeing that. So in their language, they have left many "Ester Eggs" in MATLAB, that a user can try. They may belongs to the category given below:
  • Unexpected but intentional behavior
  • Special things that the programmers left for us to discover
  • Extra code inside a function that can be used for other purposes
  • Hidden pictures and audio clips
So let us also try few of them:- (this is the continuation of the previous part)

13. x=[-2:.001:2],y=(sqrt(cos(x)).*cos(200*x)+sqrt(abs(x))-0.7).*(4-x.*x).^0.01,plot(x,y);
Just copy & paste above command, & you will see that a "heart shaped" waveform is plotted.
MATLAB Heart plotting Command

14. "eml_asteroids" command:
Have you ever played the good old Asteroid game? Yes MATLAB has it inbuilt to kill your boredom, just type "eml_asteroids" and it will come in front of you, PLAY n ENJOY! You will be the master of your ship & you have to kill the asteroid, shooting is done through "spacebar".
MATLAB fixed point version of the classic Asteroids game.The classic Asteroids game. Even though it is purely fictitious (and not even physically correct), it is nevertheless a complicated dynamic system including collisions, rotating polygons and gaming logic.
matlab "eml_asteroids" command

15. "eml_fire" command:
Its a command that will open a simulink model & a simulation of virtual fire will be started.
matlab "eml_fire" command

16. "fifteen" command:
It will open up a sliding puzzle of fifteen squares and sixteen slots.
matlab "fifteen" command

17. "knot" command:
Knot command will open up a 3-D knot in front of us.
matlab "knot" command

18. "life" command:
MATLAB's version of Conway's Game of Life. "Life" is a cellular automaton invented by John    Conway that involves live and dead cells in a rectangular, two-dimensional universe. In MATLAB, the universe is a sparse matrix that is initially all zero.
Whether cells stay alive, die, or generate new cells depends upon how many of their eight possible neighbors are alive. By using sparse matrices, the calculations required become astonishingly simple. We use periodic (torus) boundary conditions at the edges of the universe. Pressing the "Start" button  automatically seeds this universe with several small random communities. Some will succeed and some will fail.
matlab "life" command

19. "lorenz" command:
 Plot the orbit around the Lorenz chaotic attractor. As the integration proceeds you will see a point moving around in a curious orbit in 3-D space known as a strange attractor.
matlab "lorenz" command

20. "sf_tictacflow" command:
Ever played Tic Tac Toe, here is the MATLAB's version of the same. Just type in "sf_tictacflow", and play!
matlab "sf_tictacflow" command

21. "spy" command:
This command will show up you an interesting picture & that will actually depend upon the MATLAB's version you are using, in the older versions it used to display comic spy like creature & in 2012 version and onwards it is displaying the sketch of a dog. So try and find!
matlab "spy" command

22. "xpbombs" command:
Play the minesweeper game in MATLAB's style. There are 13 bombs hidden in the mine field. Try to flag them and uncover all of the other spaces without getting blown up. In each non-bomb square is printed the number of adjacent squares which contain bombs. In our case we lost, try to win!

matlab "xpbombs" command

23. "xpquad" command:
Its the Superquadrics plotting demonstration by MATLAB. The shapes are defined by two parameters, known as  vertical roundness and horizontal roundness. These two parameters are,  controlled by the sliders.  By adjusting these parameters, you can make a cube, a sphere, a cylinder, and dozens of curious generalized ellipsoids.
matlab "xpquad" command

24. "xpsound" command:
Demonstrate MATLAB's sound capability.  
You may view the audio graphically in three ways:
# The time sequence is a 2D plot of the data as a function of time.
# In the PSD form.
# In the spectrogram view.
matlab "xpsound" command

9 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Replies
    1. A positive comment is always a morale booster for the author. Thanks!

      Delete
  3. I'm for boosting morale when I enjoy the post! Thanks for the fun.

    ReplyDelete
  4. Great job plz post useful info about MATLAB.and also let me know how to get these notifications?

    ReplyDelete
    Replies
    1. I have not configured any RSS Feed so notification would not be as such. But you can follow us on Twitter/Facebook/Google+.

      Delete
  5. Really helpful. Hope we get to learn more through this type of fun.

    ReplyDelete