title: MATLAB - show categorical variables as columns instead of rows?
body: <p>I execute the following line using the "hospital" data set and get the following:</p>
  
  <pre><code>&gt;&gt; statarray = grpstats(dsa,{'Smoker','Sex'},'mean','DataVars',{'Age','Weight'})
  statarray = 
                  Smoker    Sex       GroupCount    mean_Age    mean_Weight
      0_Female    false     Female    40            37.425      130.32     
      0_Male      false     Male      26            38.808      180.04     
      1_Female    true      Female    13            38.615      130.92     
      1_Male      true      Male      21            39.048      181.14     
  </code></pre>
  
  <p>I was wondering if it's easy to be able to instead have it be like this:</p>
  
  <pre><code>     Smoker    GroupCount    mean_Age    mean_Weight   Male   Female
  0    false     66             37.97      149.91        21     40
  1    true      34            38.882      161.94        26     13
  </code></pre>
  
  <p>I can't figure out how to bring the categorical variables to the columns like this of the stat table instead of having them as rows. Maybe this is not possible with grpstats. Just curious. Thanks!</p>