title: Logical Matrix .... Solution
body: <p>Suppose you have an NxN matrix and you have to check whether it's a upper diagonal matrix or not. Is there any generic method to solve this problem?</p>
  
  <p>I am elaborating my question:
  Some thing is like this:
  Suppose you have NXN matrix having the value of N=4
  then matrix will look like this:</p>
  
  <pre><code>|5 6 9 2|
  |1 8 4 9|
  |5 8 1 6|
  |7 6 3 2|
  </code></pre>
  
  <p>Its a 4X4 square matrix and again if it's upper triangle matrix it will look something like this:</p>
  
  <pre><code>|5 6 9 2|
  |1 8 4 0|
  |5 8 0 0|
  |7 0 0 0|
  </code></pre>
  
  <p>I need to generate a generic program in any language to check wether a square matrix is upper trailgle or not.</p>