function output = datadir(obj) %DATADIR Get the directory where data is stored % datadir(PP) returns the directory where data is stored if the object % has a specified experiment, otherwise it returns the direct directory % (where the model directly outputs its data). % % See also pricklypear/directdir, pricklypear/modeldir if isempty(obj.sim_experiment) output = obj.directdir(); else output = fullfile(obj.basedir, 'data', obj.sim_experiment); end end