Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Octave, 48 bytes

​​​​​​​​​​​​​​​imwrite(kron(mod((t=0:7)+t',2),ones(50)),'.png')

This works exactly the same as my Matlab answerMatlab answer, but there is no spiral in Octave. Instead we use a feature that Matlab does not have: We can use the assignment of t already as an expression, and later use t again in the same expression.

(This is the rescaled version, I do not want to clutter the answers here=)

#Octave, 48 bytes

​​​​​​​​​​​​​​​imwrite(kron(mod((t=0:7)+t',2),ones(50)),'.png')

This works exactly the same as my Matlab answer, but there is no spiral in Octave. Instead we use a feature that Matlab does not have: We can use the assignment of t already as an expression, and later use t again in the same expression.

(This is the rescaled version, I do not want to clutter the answers here=)

#Octave, 48 bytes

​​​​​​​​​​​​​​​imwrite(kron(mod((t=0:7)+t',2),ones(50)),'.png')

This works exactly the same as my Matlab answer, but there is no spiral in Octave. Instead we use a feature that Matlab does not have: We can use the assignment of t already as an expression, and later use t again in the same expression.

(This is the rescaled version, I do not want to clutter the answers here=)

edited body
Source Link
flawr
  • 43.9k
  • 7
  • 104
  • 249

#Octave, 6348 bytes

​​​​​​​​​​​​​​​imwrite(kron(mod((t=0:7)+t',2),ones(50)),'.png')

SavesThis works exactly the filesame as my Matlab answer, but there is no spiral in Octave. Instead we use a png filefeature that Matlab does not have: We can use the assignment of t already as an expression, and later use t again in the same expression.

(This is the rescaled version, I do not want to clutter the answers here=)

#Octave, 63

​​​​​​​​​​​​​​​imwrite(kron(mod((t=0:7)+t',2),ones(50)),'.png')

Saves the file as a png file.

(This is the rescaled version, I do not want to clutter the answers here=)

#Octave, 48 bytes

​​​​​​​​​​​​​​​imwrite(kron(mod((t=0:7)+t',2),ones(50)),'.png')

This works exactly the same as my Matlab answer, but there is no spiral in Octave. Instead we use a feature that Matlab does not have: We can use the assignment of t already as an expression, and later use t again in the same expression.

(This is the rescaled version, I do not want to clutter the answers here=)

Source Link
flawr
  • 43.9k
  • 7
  • 104
  • 249

#Octave, 63

​​​​​​​​​​​​​​​imwrite(kron(mod((t=0:7)+t',2),ones(50)),'.png')

Saves the file as a png file.

(This is the rescaled version, I do not want to clutter the answers here=)