<< sudoku_locatenakedsubset Algorithms sudoku_visiblefrom2 >>

Sudoku Toolbox >> Algorithms > sudoku_visiblefrom

sudoku_visiblefrom

Compute the cells visible from cell a.

Calling Sequence

V = sudoku_visiblefrom ( a )

Parameters

a:

a 1x2 matrix, where a(1) is a row index and a(2) is a column index

V:

a 9x9 boolean matrix. V(i,j) is true if the cell (i,j) is visible from cell a.

Description

Returns the matrix of cells which are visible from both the cell a. The cell p is visible from the cell a if it is in the same row, column or box.

Examples

V = sudoku_visiblefrom ( [1 2] ); sudoku_print(V)
V = sudoku_visiblefrom ( [2 3] ); sudoku_print(V)
V = sudoku_visiblefrom ( [3 4] ); sudoku_print(V)

Authors


<< sudoku_locatenakedsubset Algorithms sudoku_visiblefrom2 >>