Home > functions > internal > dsZipDemoData.m

dsZipDemoData

PURPOSE ^

ZIPDEMODATA - Zips demo data (utility function)

SYNOPSIS ^

function zipfname = dsZipDemoData(study_dir)

DESCRIPTION ^

ZIPDEMODATA - Zips demo data (utility function)

 Purpose: Packages demo data into zip file and stores it in its
 appropriate location. This is useful if you want to create demo data to
 package with DynaSim.

 Usage:
   zipfname = dsZipDemoData(study_dir)

 Inputs:
   study_dir: input 

 Outputs:
   zipfname: string with location of zipped file

 Examples:
   zipfname = dsZipDemoData('/Users/davestanley/Documents/DynaSimData/demos/demo_sPING_100cells_3x3')

 See also: undsZipDemoData, demos_generate_data.m (demo script)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function zipfname = dsZipDemoData(study_dir)
0002 %ZIPDEMODATA - Zips demo data (utility function)
0003 %
0004 % Purpose: Packages demo data into zip file and stores it in its
0005 % appropriate location. This is useful if you want to create demo data to
0006 % package with DynaSim.
0007 %
0008 % Usage:
0009 %   zipfname = dsZipDemoData(study_dir)
0010 %
0011 % Inputs:
0012 %   study_dir: input
0013 %
0014 % Outputs:
0015 %   zipfname: string with location of zipped file
0016 %
0017 % Examples:
0018 %   zipfname = dsZipDemoData('/Users/davestanley/Documents/DynaSimData/demos/demo_sPING_100cells_3x3')
0019 %
0020 % See also: undsZipDemoData, demos_generate_data.m (demo script)
0021 
0022     ds_root_path = dsGetConfig('ds_root_path');
0023     demos_path = dsGetConfig('demos_path');
0024     demo_zips_path = dsGetConfig('demos_zips_path');
0025 
0026     mkdirSilent(demo_zips_path);
0027 
0028     % Remove prefix
0029     [~,study_name] = fileparts(study_dir);
0030 
0031 
0032     zipfname = fullfile(demo_zips_path,[study_name '.zip']);
0033     zip(zipfname, fullfile(demos_path,study_name))
0034 
0035 end

Generated on Tue 12-Dec-2017 11:32:10 by m2html © 2005