[offset, dwell, onsets, n_loops] = easyInstruct(instructions, params, tokens)


A frequent requirement in psychology experiments is to present participants with one or more pages of instruction text and graphics. This function makes this easy to do, and returns some useful information about how it went.


All input arguments are required. They are as follows: instructions: a cell array of strings. Each string will be presented on its own page of instructions. If there is more than one page of instructions, an option to start the instructions over again will be offered on the final slide. If any of the strings consists of a file name that can be found, easyInstruct will attempt to load the file as an image and display it optimally on the screen. params, tokens: structures supplied by easyLaunch.


offset: the time at which presentation of instructions was exited. dwell: a numeric array describing how many seconds the participant spent on each slide, of the form dwell(slide_num, loop_num). onsets: a numeric array describing the time at which each page of instructions was presented, of the same form as dwell. n_loops: how many times the user looped through the instructions.