Review questions on structs --------------------------- 1. TopHalf function C = topHalf(A) % Refer to Lecture 21. % Suppose A is a length-50 structure array with two fields % Assume A(k).name is a string that names a state and A(k).pop % is an integer whose value is the states population. % Assume that the states are ordered alphabetically. % C is a length-25 cell array of strings that names all the % states whose populations are above the median state population. % The states should be ordered alphabetically in C. 2. BigTriplets function N = BigTriplets(A) % Refer to the Lectures 20 and 21. % Suppose A is a length-50 structure array with two fields. % Assume A(k).name is a string that names a state and A(k).pop % is an integer whose value is the states population. % We say that three different states form a "big triplet" if % the sum of their populations is greater than 15 million. % N is the number of big triplets. 3. Point struct % Given a structure array Pts where each structure has two fields, x and y, % sort Pts so that the structures are in the order of % increasing distance from (0,0)