Example of sorting strings:
To sort a cell array of strings, also the sort function is used. The illustration is as follows,
>> engcellnames = {'Chemical','Mechanical',. . .
'Biomedical','Electrical', 'Industrial'};
>> sort(engcellnames')
ans =
'Biomedical'
'Chemical'
'Electrical'
'Industrial'
'Mechanical'