counts.m
来自「This is matlab sourcecode for measuring 」· M 代码 · 共 11 行
M
11 行
function c=counts(x,v)
% COUNTS counts the number of elements of x that fall within v
% COUNTS(x,v) returns the number of elements such that
% v(1)<=x, ....v(n-1)<x<=v(n)
c=[];
nv=[-Inf; v];
for i=2:rows(nv);
t=sum(x<=nv(i) & x>nv(i-1));
c(i-1,1)=t;
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?