MATLAB: Merging Arrays in a Struct and Sorting them

arraysmergingsortingstruct

Hello, I have a struct like this:
talha4.JPG
I want to join its two arrays into one array and then sort them in ascending order, I am trying this code, but it is not giving me results:
c = [v(1) v(2)]
sort_c = sort(c);

Best Answer

result = sort(struct2array(v), 'ascend')
Related Question