title: How to rename only few variables in MATLAB table?
body: <p>I want to generate a table but want to set the variable name of only one variable but want all other variables to keep their name.</p>
  
  <p>Example,
  say I have this data:</p>
  
  <pre><code>User1 = rand(5,1);
  User2 = rand(5,1);
  User3 = rand(5,2);
  </code></pre>
  
  <p>I can now make the table using:</p>
  
  <pre><code>table(User1 , User2 , User3(:,1))
  </code></pre>
  
  <p>This gives me this:</p>
  
  <pre><code>ans = 
  
   User1       User2        Var3  
  ________    ________    ________
  
   0.55229    0.049533     0.14651
   0.62988     0.48957     0.18907
  0.031991     0.19251    0.042652
   0.61471     0.12308      0.6352
   0.36241     0.20549     0.28187
  </code></pre>
  
  <p>I want to get this:</p>
  
  <pre><code>ans = 
  
   User1       User2        User3  
  ________    ________    ________
  
   0.55229    0.049533     0.14651
   0.62988     0.48957     0.18907
  0.031991     0.19251    0.042652
   0.61471     0.12308      0.6352
   0.36241     0.20549     0.28187
  </code></pre>
  
  <p>I tried to do this:</p>
  
  <pre><code>table(User1 , User2 , User3(:,1), 'VariableNames',{'','','User3'} )
  </code></pre>
  
  <p>But this gives error:</p>
  
  <pre><code>Error using setVarNames (line 33)
  The VariableNames property must be a cell array, with each element containing one nonempty
  string.
  
  Error in table (line 305)
              t = setVarNames(t,vnames); % error if invalid, duplicate, or empty
  </code></pre>
  
  <p>How do I solve my problem with MATLAB 2014b? </p>
  
  <p>For my data, <code>d</code> is generated and table is made in a loop  and I want to keep all the values of <code>d</code>. If this matters somehow.</p>