Padded with 0's in convolution kernel to avoid collisions
Wow, using a string really cuts down on solution size.
Can someone please tell me whats going on?!
The reshape function creates a matrix with the vector [1 3 9 27] placed vertically, horizontally, and diagonally; the conv2 function does sort of a dot product of these with all sets of four elements in the test matrix; if [1 1 1 1] or [2 2 2 2] appears, the result will be 40 or 80, respectively.
Impressive code compression
This code is referenced in the following blog post: http://blogs.mathworks.com/community/2015/01/19/robot-game-playing-in-matlab-part-2/
Tic Tac Toe FTW
Is the Point in a Circle?
Is X a Fibonacci Matrix?
Natural numbers in string form
Divide by 4
Remove any row in which a NaN appears
Find the alphabetic word product
Given two arrays, find the maximum overlap
What is the next step in Conway's Life?
It dseon't mettar waht oedrr the lrettes in a wrod are.
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office