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

📄 hconsec.m

📁 matlab 在线性代数中的应用 利用matlab实现可以提高对所学知识的理解 更有助于你考研
💻 M
字号:
function A=hconsec(n)
% The command A=hconsec(n) will generate an nxn matrix whose 
% entries in each row are consecutive integers. The first
% entry in each row is the same as the number of the row.
% Thus the first row will be [1, 2, ..., n], the second row 
% will be [2,3, ..., n+1], etc. For example the command 
% hconsec(4) will generate the matrix
%
%                1   2   3   4
%                2   3   4   5
%                3   4   5   6
%                4   5   6   7  
A=hankel([1:n]',[n:2*n-1]);

⌨️ 快捷键说明

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