Check settingsDB

From Bcontrol
% [settings] = check_settingsDB(ratname, experimenter, varname, dates, {'nth', 1})
%
% Reports on settings for a particular rat; the report is printed out to
% the command line. If the value of the settings is a cell then the value
% is passed in the output but not displayed.
%
% Uses regexp to match the varname.  If the varname matches multiple
% SoloParamHandles the function prints out all matching variables.
%
% Uses the solodata mysql schema.  Will only function for rats that are running
% on a protocol with a table in this schema.
%
% PARAMETERS:
% -----------
%
% ratname       A string representing the name of the rat, e.g., 'B059'
%
% experimenter  A string representing the name of the experimenter, e.g.,
%              'Bing'
%
% varname       The name of the SoloParamHandle whose settings are being
%               checked for. A regular expression match between varname and
%               the fullname of the SoloParamHandle will be done; if this
%               is successful, that SPH is considered a target. Thus, to
%               look for an SPH that ends with "ments", you would use
%               varname "\w*ments$". \w* means any number of word
%               characters; $ means end of string (see regexp.m)
% 
% dates         By default looks at the settings file with the latest date.
%               dates can be a scalar or a vector of integers indicating
%               the number of files to look back to. E.g., -5:0 means look
%               at the files with the latest 6 dates.
%				dates can also be a date string, e.g. '2009-05-10' or a 
%				cell array of date strings 
%    
%
% OPTIONAL PARAMETERS:
% --------------------
%
% nth           By default, 1. Sometimes a varname will match more than one
%               SPH. nth will indicate which match to use-- the default is
%               to use the first match. 2 means use the second, etc.
%

% written by Jeffrey Erlich 2009
% modified from check_settings.m by Carlos Brody 2009