Get sessdata
From Bcontrol
[S, extra_args]=get_sessdata(varargin) [S, extra_args]=get_sessdata(sessid) [S, extra_args]=get_sessdata(ratname,experimenter, date) [S, extra_args]=get_sessdata(ratname,experimenter, daterange) A frontend to get data from the sessions table that does some nice input parsing. Useful to use in other functions to avoid having to parse inputs. If you pass it all the args from a parent function the leftover args are returned as extra_args. For a good example of this see psychoplot_delori.m (in ExperPort/Analysis/SameDifferent) S by default contains fields: sessid, sessiondate, protocol_data, protocol and parsed_events_history (peh) S is sorted chronologically with S.sessid(1) being the oldest record. sessid can be a single sessid or a vector of sessids date should be of the form 'YYYY-MM-DD' or a relative date like -5 daterange should be a numeric vector in relative form like -10:-1 or a cell array of date strings of the form {'2009-04-22' '2009-02-01'}