Home > atmlab > deprecated > list_datasets.m

list_datasets

PURPOSE ^

list_datasets Returns of a list of all datasets supported by this subsystem

SYNOPSIS ^

function datasets = list_datasets(only_config)

DESCRIPTION ^

 list_datasets Returns of a list of all datasets supported by this subsystem

 Return a list of all datasets supported by the subsystem. By default, it
 returns all that can be configured. If passed a true value, it only
 returns those that actually are configured.

 FORMAT

   datasets = list_datasets([only_config])

 IN

       only_config     logical     (optional) if true, only return those
                                   that are actually configured and thus
                                   can be used.

 OUT

       datasets        cellstr     Cell array of strings, those datasets
                                   that can be or are configured.

 $Id: list_datasets.m 7553 2012-04-27 19:08:16Z gerrit $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

list_datasets.m

SOURCE CODE ^

0001 function datasets = list_datasets(only_config)
0002 
0003 % list_datasets Returns of a list of all datasets supported by this subsystem
0004 %
0005 % Return a list of all datasets supported by the subsystem. By default, it
0006 % returns all that can be configured. If passed a true value, it only
0007 % returns those that actually are configured.
0008 %
0009 % FORMAT
0010 %
0011 %   datasets = list_datasets([only_config])
0012 %
0013 % IN
0014 %
0015 %       only_config     logical     (optional) if true, only return those
0016 %                                   that are actually configured and thus
0017 %                                   can be used.
0018 %
0019 % OUT
0020 %
0021 %       datasets        cellstr     Cell array of strings, those datasets
0022 %                                   that can be or are configured.
0023 %
0024 % $Id: list_datasets.m 7553 2012-04-27 19:08:16Z gerrit $
0025 
0026 warning(['atmlab:' mfilename ':deprecated'], ...
0027     'list_datasets is deprecated, no longer maintained, may fail, etc.. Use ''datasets'' instead');
0028 
0029 if ~exist('only_config', 'var')
0030     only_config = false;
0031 end
0032 
0033 D = datasets_config;
0034 fields = fieldnames(D);
0035 has_basedir = cellfun(@(v) strcmp(v(end-6:end), 'basedir'), fields);
0036 datasets = cellfun(@(v) v(1:end-8), fields(has_basedir), 'UniformOutput', false);
0037 if only_config
0038     datasets = datasets(cellfun(@(v) any(D.([v '_basedir'])), datasets));
0039 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005