⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matrix2chess.m

📁 国际象棋程序,解压到当前目录,在matlab窗口输入chess即可应用
💻 M
字号:
function n = matrix2chess(pos)
% matrix2chess matrix to chess notation
% A position is given in matrix notation and the chess notation is
% required.
%
% Inputs:
% * pos ... position in matrix notation (i.e. [2 4] row two, column four)
%
% Outputs:
% * n ... chess notation (i.e. [2 4] ~ 'd7')
%
% Example
% Transform a position from matrix notation into chess notation
%+ n = matrix2chess([2 4])
%
% See also: matrix2xy
%
%% Signature
% Author: W.Garn
% E-Mail: wgarn@yahoo.com
% Date: 2006/03/23 12:00:00 
% 
% Copyright 2006 W.Garn
%
xy = matrix2xy(pos);
n = [char(96+xy(1)) num2str(xy(2))];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -