Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 edited body
source | link

Octave, 5050 48 bytes

Anonymous function:

C=@@()repmat([A=repmat(47,4,5) B=A*2-2;B A ''],3,36)

You can try online here. Simply run the above command and then run the function with Cans().

Essentially this creates an array of the value 47 which is 4 high and 5 wide. It then creates a second array of value 92 which is the same size.

The two arrays are concatenated into a checkerboard of [A B;B A][A B;B A]. The '' is concatenated as well to force conversion to character strings.

Finally the whole array is replicated three3 times in each dimensiondown and 6 times across to form the final size.  


  • Saved 2 bytes, thanks @StewieGriffin

Octave, 50 bytes

Anonymous function:

C=@()repmat([A=repmat(47,4,5) B=A*2-2;B A ''],3,3)

You can try online here. Simply run the above command and then run the function with C().

Essentially this creates an array of the value 47 which is 4 high and 5 wide. It then creates a second array of value 92 which is the same size.

The two arrays are concatenated into a checkerboard of [A B;B A]. The '' is concatenated as well to force conversion to character strings.

Finally the whole array is replicated three times in each dimension to form the final size.  

Octave, 50 48 bytes

Anonymous function:

@()repmat([A=repmat(47,4,5) B=A*2-2;B A ''],3,6)

You can try online here. Simply run the above command and then run the function with ans().

Essentially this creates an array of the value 47 which is 4 high and 5 wide. It then creates a second array of value 92 which is the same size.

The two arrays are concatenated into a checkerboard of [A B;B A]. The '' is concatenated as well to force conversion to character strings.

Finally the whole array is replicated 3 times down and 6 times across to form the final size.


  • Saved 2 bytes, thanks @StewieGriffin
1
source | link

Octave, 50 bytes

Anonymous function:

C=@()repmat([A=repmat(47,4,5) B=A*2-2;B A ''],3,3)

You can try online here. Simply run the above command and then run the function with C().

Essentially this creates an array of the value 47 which is 4 high and 5 wide. It then creates a second array of value 92 which is the same size.

The two arrays are concatenated into a checkerboard of [A B;B A]. The '' is concatenated as well to force conversion to character strings.

Finally the whole array is replicated three times in each dimension to form the final size.