📄 xy2matrix.m
字号:
function m_pos = xy2matrix( xy_pos )
% xy2matrix chess xy position to matrix position
% 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])
%
% See also: matrix2chess, matrix2xy
%
%% Signature
% Author: W.Garn
% E-Mail: wgarn@yahoo.com
% Date: 2006/03/23 12:00:00
%
% Copyright 2006 W.Garn
%
m_pos(1) = 9 - xy_pos(2); % row
m_pos(2) = xy_pos(1); % column
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -