1. (10 points A script stores information on potential subjects for an experimen
ID: 643666 • Letter: 1
Question
1. (10 points A script stores information on potential subjects for an experiment within an array of structures called mysubj ects. The following shows an example of the various structure members and their contents: > > my_subjects(1) Ans= name: 'Optimus Prime' sub_id: 1 height: 13.5000 weight: 1900 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 arrays of arbitrary length. An example of a script that will invoke your function is shown below. The sorted-names array returned by the function will contain, in order. Starscream MegatronExplanation / Answer
public string Max_value(array[]) int c; { for (c=0;cRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.