User:Cristina

From PrattWiki
Jump to navigation Jump to search

Neuromorphic Chips, Robert D. Hof, MIT Technology Review, updated 23 April 2014, accessed 12 September 2014 (Grand Challenge)


Homework 2: MATLAB Help and Demonstrations


My favorite demonstration in MATLAB was The Sliding Puzzle. In this demo, there were 16 spaces and 15 blocks numbered 1-15. The objective was to slide the blocks around until they were lined up in order from 1-15. I liked this demonstration because I thought it was really interesting that a MATLAB script could be written so that the resulting program would continuously respond to stimuli such as mouse clicks. One part of the program that I found particularly cool was how the blank space is actually a block numbered 16, but the block is colored so that the number isn't visible and is then used to keep track of the "score" so that the game knows when the person has completed it. Every move needs to be checked to make sure it's "legal" by using the x and y coordinates of the block and the "free space" (block 16). Then the program checks for the "winner" to see if the game has been completed; when it's over, a "winner!!" message appears below the blocks. The program runs very smoothly and responds to mouse clicks very smoothly, showing MATLAB's capabilities. Lastly, I like this demonstration because its code shows how every detail and action has to be programmed into MATLAB to make it respond in what seems like a spontaneous and simple manner.