Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
ArrayTools[AllNonZero] - true when the Array has no zero entries
ArrayTools[HasZero] - true when the Array has a zero entry
ArrayTools[HasNonZero] - true when the Array has a non-zero entry
ArrayTools[IsZero] - true when the Array has only zero entries
ArrayTools[AnyNonZeros] - collapse non-zero lines to 1, zero lines to 0
Calling Sequence
AllNonZero(A)
HasNonZero(A)
HasZero(A)
IsZero(A)
AnyNonZeros(A,dim)
Parameters
A
-
Matrix, Vector, or Array
dim
optional; integer dimension
Description
These commands check for the presence of zero or non-zero entries in an Array.
The HasNonZero command returns true when a single element of the Array is non-zero.
The HasZero command returns true when a single element of the Array is zero.
The IsZero command returns true when every element of the array is zero.
The AnyNonZeros command returns 0, 1, or an Array. The first non-singleton dimension, or the dimension specified is replaced with constant zeros or ones depending on the presence of non-zero values.
These commands are part of the ArrayTools package, so they can be used in the short form AllNonZero(..), HasZero(..), HasNonZero(..), IsZero(..), or AnyNonZeros(..) only after executing the command with(ArrayTools). However, they can always be accessed through the long form of the command by using ArrayTools[AllNonZero](..), ArrayTools[HasZero](..), ArrayTools[HasNonZero](..), ArrayTools[IsZero](..), or ArrayTools[AnyNonZeros](..), respectively.
Examples
See Also
ArrayTools
Download Help Document