Difference between revisions of "Get sessdata"

From Bcontrol
Line 14: Line 14:
 
   
 
   
 
   sessid can be a single sessid or a vector of sessids
 
   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
+
   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
 
   daterange should be a numeric vector in relative form like -10:-1 or a
   cell array of date string of the from "YYYY-MM-DD"
+
   cell array of date strings of the form {'2009-04-22' '2009-02-01'}
  
 
</pre>
 
</pre>

Revision as of 06:23, 10 June 2009

  [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)
 
  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'}