function [] = cmbfast_clean(param)

% =========================================================================
% cmbfast_clean.m - A helper routine to erase output files from CMBFAST
% Last modified: January 25, 2006
% Judd D. Bowman
%
% This function deletes the output files generated by CMBFAST.  Pass to it
% the 'param' structure from cmbfast.m to delete the files associated with
% a particular run of CMBFAST.
%
% INPUT
% =====
% param = the output structure from cmbfast(...) that contains the file names
% and parameters for a specific run of CMBFAST.
%
% OUTPUT
% ======
% None
%
% =========================================================================

if (iscell(param.ftf))
	for n = 1:length(param.ftf)   
        if (exist(param.ftf{n}) > 0)
            delete(param.ftf{n});
        end
	end
elseif (exist(param.ftf) > 0)
    delete(param.ftf);
end
    
if (exist(param.fcl) > 0)
    delete(param.fcl);
end

if (exist(param.fgl) > 0)
    delete(param.fgl);
end

if (exist(param.tcl) > 0)
    delete(param.tcl);
end

if (exist(param.fts) > 0)
    delete(param.fts);
end

if (exist(param.fpa) > 0)
    delete(param.fpa);
end


Sable
github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/9760-cmbfast-wrapper-routines/cmbfast_clean.m
mcbench-benchmarks
github-repos/MATLAB/Sable-mcbench-benchmarks
ba13b2f0296ef49491b95e3f984c7c41fccdb6d8