Richard, I think your test suite has an error in it. Both pd and pad will result in the same matrix, as they're both circshifted by [1 1-i] Will pad=fliplr(pad); after the for loop correct this problem?
Test Suite fixed. Who new that 1-i is the same as -i+1.
I had not recognized the symmetry of row and column processing. A very succinct method to create a Knight pattern.
Back to basics 11 - Max Integer
Sum the Infinite Series
Return the Fibonacci Sequence
Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
PACMAT 06 - Optimized Ghosts, Equal Speed, Inf Lives; Interactive Download
PONG 002: Rectangle, Interactive Download, Easier Play
GJam 2011 Africa Qual A: Maximum Loop Size
USC Spring 2013 ACM: Relief Supplies
Unique: Enhanced Performance - Large and Wide Array - Speed Improvement (66% savings)
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