Question: matlab 8.6 - Eligible Subjects A script stores information on potential subjects for an experiment in a vector of structures called subjects. The following shows
matlab

8.6 - Eligible Subjects A script stores information on potential subjects for an experiment in a vector of structures called subjects. The following shows an example of what the contents might be: >subjects (1) ans = name: Joey sub_id: 111 height: 6.7000 weight: 222.2000 For this particular experiment, the only subjects who are eligible are those whose height OR weight is lower than the average height or weight of all subjects. The script will print the names of those who are eligible and store those names in a cell array. Create a vector with 3 sample subjects, then write the code to accomplish this. Don't assume that the length of the vector is known; the code should be general Your Script C Reset MATLAB Documentation 1% create vector of structures named subjects with potential subjects 2% for the experiment (see example above). Calculate the average height 3% and weight, then determine and print eligible participants 4 subjects 6 7 scalculate the average height and weight 8 avgheight 9 avgweight = 1 2%find and print the names of the eligible participants. Also store them in the nameArray cell array 4 nameArray = {}; 5 6 Run Script
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
