📄 zmatrix.m
字号:
function Z=Zmatrix(n)
% The command Z=Zmatrix(n) generates
% a matrix of 0's and 1's whose nonzero
% entries are in the form a letter Z,
% that is, the first and last rows
% and the anti-diagonal consist entirely
% of 1's and the remaining entries of the
% matrix are all 0.
Z=fliplr(eye(n));
Z(1,:)=ones(1,n);
Z(n,:)=ones(1,n);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -