title: Comparing values to the empty set [] in Matlab in an if statement
body: <p>I would like to do stuff when a comparison evaluates to <code>[]</code> or <code>TRUE</code>.</p>
  
  <p>For example, suppose the comparison is <code>x &gt; 1</code> where x can be both of the following.</p>
  
  <pre><code>x = 2
  x = []
  </code></pre>
  
  <p>I want to display 'yes' if <code>x &gt; 1</code> gives <code>[]</code> or <code>TRUE</code>.</p>
  
  <p>I could do</p>
  
  <pre><code>if x &lt;= 1
      disp 'no'
  else 
      disp 'yes'
  end
  </code></pre>
  
  <p>But is there a straightforward way of doing this without negating the comparison operator?</p>
  
  <p>EDIT in response to the first answer: I would like to avoid use of the <code>isempty</code> operator.</p>