<< sudoku_candidates Algorithms sudoku_candidatesmerge >>

Sudoku Toolbox >> Algorithms > sudoku_candidatescell

sudoku_candidatescell

Returns candidates for a cell in a sudoku.

Calling Sequence

C = sudoku_candidatescell ( X , i , j )

Parameters

X:

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

i:

an integer index in the interval 1, 2, ..., 9

j:

an integer index in the interval 1, 2, ..., 9

C:

a row matrix of candidates for the current cell

Description

Returns candidates for the entry (i,j) in a sudoku X.

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
];
C = sudoku_candidatescell(X,1,3);
C = sudoku_candidatescell(X,3,1);
C = sudoku_candidatescell(X,4,7);

See also

Authors

Bibliography

Programming Sudoku, Wei-Meng Lee, 2006


<< sudoku_candidates Algorithms sudoku_candidatesmerge >>