Last active
December 1, 2016 14:34
-
-
Save butchi/d7e4feb4aff9a4c97a87362b11c52b7a to your computer and use it in GitHub Desktop.
Mathematicaで数表のハイライト ref: http://qiita.com/butchi_y/items/40123394f9acd32c288f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
highlightTable[tbl_, crit_, color_: Red] := | |
Grid[tbl] /. {n_?crit -> Item[n, Background -> color]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Grid[Table[x y - 1, {y, 15}, {x, 15}]] /. {n_?PrimeQ -> Item[n, Background -> Red]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tbl = Table[x y - 1, {y, 10}, {x, 10}]; | |
highlightTable[tbl, PrimeQ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment