📄 colsum.m
字号:
function s = colSum(X)% s = colSum(X)%% Outputs a row vector whose elements are the% sums of the columns of X.% Designed to get round the feature of the standard% routine (sum) of summimg row vectors to a scalar.% If colSum is handed a row vector, the same vector% is given back.%% Inputs%% X matrix (m-by-n)%% Output%% s vector (1-by-n)[m,n] = size(X);if m > 1 s = sum(X);else s = X;end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -