Question: A script stores information on potential subjects for an experiment in a vector of structures called subjects . The following shows an example of what
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. Dont assume that the length of the vector is known; the code should be general.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
