Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Colored checkerboard' topicStudent Support Forum > General > Archives > "Colored checkerboard"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
yehuda
01/23/13 06:46am

This is a coloring problems over a rectangular grid
It has a simple solution, so I'll just show you how to implement it rather than find it

colors = {Red, Green, Blue, Yellow};
oddColors = PadRight[colors, 10, colors];
rotcolors = RotateRight[{Red, Green, Blue, Yellow}, 2];
evenColors = PadRight[rotcolors, 10, rotcolors];
ArrayPlot[Partition[Flatten[Table[{oddColors, evenColors}, {5}]], 10]]


yehuda

URL: ,

Subject (listing for 'Colored checkerboard')
Author Date Posted
Colored checkerboard Savage 01/22/13 11:21am
Re: Colored checkerboard Bill Simpson 01/22/13 10:30pm
Re: Re: Colored checkerboard Savage 01/24/13 1:41pm
Re: Re: Re: Colored checkerboard Bill Simpson 01/24/13 10:41pm
Re: Colored checkerboard yehuda 01/23/13 06:46am
Re: Colored checkerboard Bill Simpson 01/25/13 3:25pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic