Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Verify if a matrix is upper triangular. Also if it is lower triangular
Date: Sat, 24 Nov 2012 20:17:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <k8ra04$pab$1@newscl01ah.mathworks.com>
References: <k8r8qj$ljq$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1353788228 25931 172.30.248.46 (24 Nov 2012 20:17:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 24 Nov 2012 20:17:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:783410

"Edwardo " <edwardo.rivera@upr.edu> wrote in message <k8r8qj$ljq$1@newscl01ah.mathworks.com>...
> ..... I want to test if a matrix is upper or lower triangular.
- - - - - - - -
  Let A be a square matrix.  It is upper triangular if 

 all(all(tril(A,-1)==0))

is true.

Roger Stafford