📄 matrix2xy.m
字号:
function xy_pos = matrix2xy(m_pos)
% matrix2xy matrix position to chess xy position
% A position is given in matrix notation and the chess xy position is
% required.
%
% Inputs:
% * m_pos ... position in matrix notation (i.e. [2 4] row two, column four)
%
% Outputs:
% * xy_pos ... position in chess xy notation ([2 4]-> [4 7])
%
% Example
% Transform a position from matrix notation into chess xy position
%+ xy_pos = matrix2xy([2 4])
%
% See also: matrix2chess, xy2matrix
%
%% Signature
% Author: W.Garn
% E-Mail: wgarn@yahoo.com
% Date: 2006/03/23 12:00:00
%
% Copyright 2006 W.Garn
%
xy_pos(1) = m_pos(2); % x
xy_pos(2) = 9 - m_pos(1); % y
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -