📄 dupcol.m
字号:
function M = dupCol(v, n)% M = dupCol(v, n)%% Duplicates v, a column vector, n times. Returns the% result as matrix M with n columns, each one a copy of v.%% Inputs%% v a column vector (m-by-1)% n a positive integer%% Output%% M a matrix (m-by-n) matrix[r, c] = size(v);if c ~= 1 error('dupCol: input vector must be column')endM = v(:, ones(1, n));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -