<< sudoku_cellcandidates Algorithms sudoku_findhiddensubset >>

Sudoku Toolbox >> Algorithms > sudoku_confirmcell

sudoku_confirmcell

Confirm the value of a cell.

Calling Sequence

[ X , C , L ] = sudoku_confirmcell ( X , C , L , i , j , v )
[ X , C , L ] = sudoku_confirmcell ( X , C , L , i , j , v , verbose )

Parameters

X:

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

C:

a 9 x 9 cell of candidates

L:

the 9 x 9 matrix of number candidates

i:

the row of the value

j:

the column of the value

v:

the value to remove

Description

Confirms v as a value for X(i,j) and remove this value from candidates of the row, column and block.

Examples

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

Authors


<< sudoku_cellcandidates Algorithms sudoku_findhiddensubset >>