I have a cell array in Matlab DataVal which I would like to sort. Some of the elements in the array are empty. Any idea how to sort the elements of this cell array. When sorted, I would prefer, the empty elements at the beginning or the end of the sorted array.
DataVal
ans =
[]
[ 82.1000]
[ 16.1500]
[ 56.0200]
[]
[ 74.9600]
[ 35.1400]
I used sort and sortrows. Both these commands seem to ignore the empty elements.
Thanks