<< Read/Write Read/Write sudoku_readgivens >>

Sudoku Toolbox >> Read/Write > sudoku_print

sudoku_print

Print a sudoku.

Calling Sequence

sudoku_print ( X )

Parameters

X:

a 9-by-9 matrix, with 0 for unknown entries.

Description

Print a sudoku X, regrouping rows. Formats the printing to make the subblocks clearer. Make so that the output can be directly used for matrix input.

Examples

X = [
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 5 3 0
9 0 0 0 3 7 0 0 0
0 0 2 3 0 1 0 9 6
0 4 7 6 9 0 1 8 0
0 0 6 7 8 5 0 0 0
0 5 0 0 2 0 9 0 3
0 3 0 9 0 0 6 0 8
8 0 0 0 1 0 4 7 0
];
sudoku_print(X);
[C,L] = sudoku_candidates(X);
sudoku_print(C);

Authors

<< Read/Write Read/Write sudoku_readgivens >>