xmatrix.m

来自「matlab 在线性代数中的应用 利用matlab实现可以提高对所学知识的理解 」· M 代码 · 共 10 行

M
10 行
字号
function X=Xmatrix(n)
% The command X=Xmatrix(n) generates
% a matrix of 0's and 1's whose nonzero
% entries are in the form a letter X,
% that is, the main diagonal and the
% anti-diagonal consist entirely of 1's
% and the remaining entries of the
% matrix are all 0.
X=eye(n)|fliplr(eye(n));

⌨️ 快捷键说明

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