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

📄 consec.m

📁 线性代数实验及MATLAB入门,电子工业出版社出版 陈怀琛 龚杰民合著
💻 M
字号:
function A=consec(n)
% The command A=consec(n) will generate an nxn matrix whose 
% entries are the consecutive integers from 1 to n^2. The 
% first row will be [1, 2, ..., n], the second row will be 
% [n+1, n+2, ..., 2n], etc. For example the command consec(3) 
% will generate the matrix
%
%            1  2  3
%            4  5  6
%            7  8  9
A=reshape([1:n^2],n,n)';

⌨️ 快捷键说明

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