Matlab rearrange the rows of a 2D cell array by the numbers of string of the first column
<p>I have a matlab cell like this</p>

<pre><code>BCLK103     4.000    5.112    7.055    
BCLK105     5.000    5.112    7.255
BCLK109     4.050    5.112    7.152
BCLK103     4.000    5.112    7.555
BCLK109     7.000    5.112    7.545
BCLK105     4.060    6.12     8.555
BCLK103     4.600    6.182    9.55
BCLK109     4.900    6.142    8.545
</code></pre>

<p>I want to have</p>

<pre><code>BCLK103     4.000    5.102    7.055    
BCLK103     4.100    5.112    7.555
BCLK103     4.600    6.182    9.55
BCLK105     5.000    5.112    7.255
BCLK105     4.060    6.12     8.555
BCLK109     4.050    5.112    7.152
BCLK109     7.000    5.112    7.545
BCLK109     4.900    6.142    8.545
</code></pre>

<p>I tried to use </p>

<pre><code>Str = sprintf('%s,', CellArray{:,:});
D = sscanf(Str, '%g,');
[dummy, index] = sort(D);
sortedCellArray = CellArray(index);
</code></pre>

<p>But Matlab gives </p>

<pre><code>Warning: The argument for the %s format specifier must be of type char (a string).
</code></pre>

<p>Would anyone please teach me how to rearrange the rows of this cell array by the last number (ie 103,105,109) of string (ie BCLK103,BCLK105,BCLK109) in the first column? Sorry that I am a new learner to matlab. </p>

<p>Thank you.</p>