% Randomly assign order of term project presentation for Geophysical Data % Analysis cource % % These people asked to go on Monday volunteers = {'Wang','Kravitz'}; % Use matlab cell arrays because each name string has a different length % and a string matrix (which demands all strings have the same length) is % not an appropriate data format % In alphabetical order, the others who did not volunteer for Monday others = {'Anderson','Aristizabal and Guo','Fernando','Haag','Jurisa',... 'Loikith','Nolan and Parsekian','Shapiro and Randall-Goodwin','Yi'}; % Initialize the random number generator so that every time this script is % invoked it starts with the same random seqence rand('seed',-1); disp(' ') disp('Schedule for term project presentations for Geophysical Data Analysis') disp(' ') % Randomly permute the list of names list = others(randperm(length(others))); % Prepend the volunteers list = [volunteers list]; % Order of presentation is... nperday = [3 4 4]; % do this many presentations per day until list is exhausted count = 1; num = 1; day = 1; while count <= length(list) disp(['Presentation ' int2str(num) ' on day ' int2str(day) ' ' char(list(count))]) count = count + 1; num = num + 1; if num > nperday(day) num = 1; day = day + 1; disp(' ') end end