title: Logical statement where all matrix elements must be greater than those in another matrix
body: <p>I'm looking for a way to test if <strong>all</strong> elements of a matrix are greater than or equal to their corresponding indexes values in another matrix, and if not to stop evaluating. This is part of an <code>elseif</code> statement for setting a lower bound for values, thus as simplified example:</p>
  
  <p>Lower Bound matrix: <code>A = [4 5 6 7]</code><br>
  New values matrix:  <code>B = [7 8 9 10]</code></p>
  
  <p>Is <code>B&gt;=A</code> then yes, accept and proceed</p>
  
  <p>whereas </p>
  
  <p>Lower Bound matrix: <code>A = [4 5 6 7]</code><br>
  New values matrix:  <code>C = [5 3 5 8]</code></p>
  
  <p>Is <code>C&gt;=A</code>? then no, all elements of <code>C</code> are not greater than <code>A</code>, reject and stop</p>
  
  <p>My solution so far is a bit hackneyed:</p>
  
  <p>Is <code>sum(C&gt;=A) &lt; length(C)</code>? no, then reject and stop</p>
  
  <p>This gives the sum of the true/false values in the comparison <code>C&gt;=A</code>, which if all values of <code>C</code> were greater would equal the length of <code>C</code>, else the sum would be less than the length of <code>C</code>. I keep thinking there's a simple and more elegant solution to this that I'm overlooking and would be grateful for any thoughts. Thanks!</p>