Post Reply 
Checking if a matrix contains only zeros
10-07-2023, 04:15 PM
Post: #3
RE: Checking if a matrix contains only zeros
(10-07-2023 01:54 PM)Didier Lachieze Wrote:  ROWNORM or COLNORM will return 0 if there is only zeros in the matrix.

ABS applied to a matrix will also return 0 only if the matrix is all zeros.

It actually computes the Frobenius norm so it might be slightly slower than the norms you mention, but it looks much cleaner and understandable in the source code.

V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Checking if a matrix contains only zeros - Valentin Albillo - 10-07-2023 04:15 PM



User(s) browsing this thread: 2 Guest(s)