Code covered by the BSD License  

Highlights from
Chess with "Greedy Edi"

image thumbnail

Chess with "Greedy Edi"

by

 

07 Nov 2009 (Updated )

Play chess against "Greedy Edi".

xy2matrix

xy2matrix

xy2matrix chess xy position to matrix position

Contents

Syntax

m_pos = xy2matrix( xy_pos )

Description

A position is given in chess xy notation and the position is in matrix notation required.

Inputs:

  • xy_pos ... position in chess xy notation ([2 4]-> [4 7])

Outputs:

  • m_pos ... position in matrix notation (i.e. [2 4] row two, column four)

Example

Transform a position from xy chess notation into matrix notation

 xy_pos = matrix2xy([4 7])
xy_pos =

     7     5

See also

matrix2chess, matrix2xy

Signature

  • Copyright 2006 W.Garn

Contact us