0001 function makeDefaultConfig()
0002
0003
0004
0005
0006 if ispc
0007 host_name= getenv('COMPUTERNAME');
0008 home_path= getenv('HOMEPATH');
0009 else
0010 [~, host_name]=system('echo $HOSTNAME');
0011 home_path= getenv('HOME');
0012 end
0013 host_name = strtrim(host_name);
0014
0015 docs_path = fullfile(home_path, 'Documents');
0016
0017
0018 ds_data_path = fullfile(docs_path,'DynaSimData');
0019 demos_path = fullfile(ds_data_path, 'demos');
0020 mex_path = fullfile(ds_data_path,'mexes');
0021
0022 ds_root_path = fileparts(fileparts(which('dsSimulate')));
0023
0024 demos_zips_path = fullfile(ds_root_path, 'demos','demo_zips');
0025
0026 ds_unitTestData_path = fullfile(ds_root_path, 'unitTestData');
0027
0028
0029 vars = who;
0030
0031 fid = fopen(fullfile(ds_root_path, 'dsConfig.txt'), 'w');
0032
0033 for thisVar = vars(:)'
0034 thisVar = thisVar{1};
0035
0036 fprintf(fid, '%s = "%s"\r\n', thisVar,eval(thisVar));
0037 end
0038
0039 fclose(fid);
0040
0041 end