Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I. A script stores information on potential subjects for an experiment within an

ID: 644734 • Letter: I

Question

I. A script stores information on potential subjects for an experiment within an array of structures called my-subjects. The following shows an example of the various structure members and their contents: Write a function called my_sort that takes as input an array of such structures and returns a cell array of strings comprising the names of the subjects sorted in increasing order of their weights. Your function must correctly handle input ways of arbitrary length. An example of a script that will invoke your function is shown below. The sorted.name array returned by the function will contain, in order:

Explanation / Answer

ANSWER