function sorted = sortstudents(unsorted)
% Copyright 1984-2019 The MathWorks, Inc.
% All Rights Reserved.

% Receive a vector of students as input
% Get scores of all the students
scores = {unsorted.score};
% Convert the cell array containing scores into a numeric array or doubles
scores = cell2mat(scores);
% Sort the scores array
[s i] = sort(scores);
% Sort the students array based on the sorted scores array
sorted = unsorted(i);
