📄 any.sci
字号:
function T=any(s)
//ANY True if any element of a vector is nonzero.
// For vectors, ANY(V) returns 1 if any of the elements of the
// vector are non-zero. Otherwise it returns 0. For matrices,
// ANY(X) operates on the columns of X, returning a row vector
// of 1's and 0's. For N-D arrays, ANY(X) operates on the first
// non-singleton dimension.
//
// ANY(X,DIM) works down the dimension DIM. For example, ANY(X,1)
// works down the first dimension (the rows) of X.
// Copyright Aldo I Maalouf
if s==zeros(s);
T=0;
else
T=1;
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -