title: MATLAB: Checking type of table
body: <p>I want to ask how to check if a variable is table 1x8 or 8x1 of type logical?
  I know I can check the class of an array for logical like this:</p>
  
  <pre><code>strcmp(class(a),'logical')
  </code></pre>
  
  <p>I know I can get the size of table like this:</p>
  
  <pre><code>[h w] = size(a);
  if(w==1 &amp; h==8 | w==8 &amp; h==1)
  </code></pre>
  
  <p>But what if table has more than 2 dimensions? How can I get number of dimensions?</p>