📄 tmatrix.m
字号:
function T=Tmatrix(n)
% The command Tmatrix(n) will generate a matrix
% of 0's and 1's in the form of a letter T. For
% the command Tmatrix(3) generates the matrix
%
% 1 1 1
% 0 1 0
% 0 1 0
% The input argument n must be odd.
if rem(n,2)==0
error('The input argument for Tmatrix must be odd')
end
T=zeros(n);
T(1,:)=ones(1,n);
T(:,(n+1)/2)=ones(n,1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -