<< sudoku_writesdk Read/Write Solve >>

Sudoku Toolbox >> Read/Write > sudoku_writess

sudoku_writess

Returns the given sudoku as a Simple Sudoku format.

Calling Sequence

str = sudoku_writess ( X )
str = sudoku_writess ( X , filename )

Parameters

X:

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

filename, optional:

a string representing a file

str:

a matrix of 11 x 11 characters, with dots "." for unknowns. The entries come row by row.

Description

Converts a sudoku in human readable format string, where "." represents unknowns. If the input argument filename is present, also writes the string into the file.

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_writess ( X )
sudoku_writess ( X , TMPDIR+"/foo.ss" )

See also

Authors

Bibliography

http://www.sudocue.net/fileformats.php


<< sudoku_writesdk Read/Write Solve >>