title: sorting cell array based on column (double not char) values
body: <p>I have a 3x1 cell array A which includes:</p>
  
  <pre><code>10.2  
  15.2  
  7.2   
  </code></pre>
  
  <p>and another 3x1 cell Array B includes:</p>
  
  <pre><code>m
  l
  s
  </code></pre>
  
  <p>I would like to join these into a new 3x2 cell Array C including:</p>
  
  <pre><code>10.2  m
  15.2  l
  7.2   v
  </code></pre>
  
  <p>then I want to sort C according to the values of the first column which is supposed to be</p>
  
  <pre><code>7.2 v
  10.2 m
  15.2 l
  </code></pre>
  
  <p>what I did so far to do this is as follows:</p>
  
  <pre><code>C=A;
  C(:,2)=B;
  C=sortrows(C,1);
  </code></pre>
  
  <p>However the result is:</p>
  
  <pre><code>10.2 m
  15.2 l
  7.2 v
  </code></pre>
  
  <p>I think the reason is that it considers the numbers in the first column as characters and the way it sorts them is by looking at the digits of each number one by one from the left.. thus 10.2 is less than 7.2.<br>
  I am looking for a way to assign the numbers as numbers to C so when I sort them it considers them as numbers not characters.  I tried to use cell2mat when assigning A and B to C but did not work.  I have searched the web for this but could not find what I am looking for.</p>
  
  <p>Thank you!</p>