alln and anyn: N-D "all" and "any" function

Improved version of the built-in "all" and "any" fuction, designed for higher-dimension input
28 Downloads
Updated 13 Aug 2016

View License

ALLN(A) is similar to all(A), but always returns a single value which determines if all matrix elements are nonzero. When A is a 2-D or higher-dimension matrix, it will return the same result as all(reshape(A, 1, [])).
ANYN(A) is similar to any(A), but always returns a single value which determines if any matrix elements are nonzero. When A is a 2-D or higher-dimension matrix, it will return the same result as any(reshape(A, 1, [])).
Both functions are useful when A can be either scalar, vector or matrix in your scripts.

Cite As

Whyjay Zheng (2024). alln and anyn: N-D "all" and "any" function (https://www.mathworks.com/matlabcentral/fileexchange/58689-alln-and-anyn-n-d-all-and-any-function), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Sparse Matrices in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Updated description.