MATLAB: How to sort a struct

sortstruct

Is it possible to sort a struct? I want to sort the third column.
0 should be in the first row and the highest value at the end (last row). The other values are not important and should be the same ranking.
Thank you.

Best Answer

You can try like this.
% a = somestruct;
[~,index] = sortrows([a.Var3].');
a = a(index);