%% EXAMPLE 1: Load the consolidated sleep diary data (load)
load diaries.mat;
%% EXERCISE 1: Diagram some arrays
%% EXAMPLE 2: Calculate the number of students in section 2 (==)
%% EXERCISE 2: Define a logical vector identifying the students in section 1.
%% EXAMPLE 3: Find the average number of minutes students in section 2 took to fall asleep (indexing)
%% EXERCISE 3: Define a variable for alarm use in section 2.
%% EXERCISE 4: Output the percentage of times that students in section 2 used an alarm.
%% EXAMPLE 4: Calculate the number of men in the cohort (strcmp)
%% EXERCISE 5: Define a variable identifying the women in the study.
%% EXAMPLE 5: Calculate the % of men in the cohort
%% EXERCISE 6: Find the fraction of the cohort that is female.
%% EXAMPLE 6: Calculate the number of men in section 2 ( & )
%% EXAMPLE 7: Calculate total students in sections 2 or 3 ( | )
%% EXAMPLE 8: Calculate the number of wake-ups that were 8:30 am or later ( >= )
%% EXAMPLE 9: Calculate % of wake-ups between 7:30 am and 9:45 am ( & )
%% EXERCISE 7: Find the percentage of students who used caffeine at least once during the study.