Just a note to anyone who wanted to use this for the same purpose as me.
If you have a cell array of strings, but want to sort by a column that contains numeric values as class string (i.e.
sort is notorious for treating strings a character at a time. So, if I used this function on the above vector, 20 would be sorted after 100 on account of the character 1 coming before 2.
I understand that this function would work wonderfully if that entire column was a number instead of a string containing a number, but depending on the application it may not be possible to force the class to double. In my case, I don't know if that column is going to contain strings or numbers until I need to sort it, so I ended up going my own route.
Very useful program though, thanks for sharing on FEX!