VERB_code_2.3
setup.m
1 %% Set up the verb code for different figures
2 %
3 % SETUP will run all the code necessary to generate and plot
4 % simulation data.
5 %
6 % This should be the only script that is called (i.e. do not run the .exe
7 % or Plot.m directly).
8 %
9 % Set the following four (4) parameters and run the code:
10 
11 %% Parameters
12 
13 % Select the operating system you are working on
14 OS = 'MAC'; % MAC, WIN, LIN
15 
16 % Choose which figure to plot
17 % Options: 6, 7, 8, 9
18 FIGURE = '7';
19 
20 % run the simulation?
21 RUN = true;
22 
23 % plot the results?
24 PLOT = true;
25 
26 %% Code
27 
28 VERBcodePath = '../Execute/';
29 OutputFolder = [VERBcodePath 'Output_' FIGURE '/'];
30 if(~exist(OutputFolder,'file'))
31  mkdir(OutputFolder)
32 end
33 copyfile([VERBcodePath 'Parameters_' FIGURE '.ini'],[VERBcodePath 'Parameters.ini']);
34 
35 
36 % this file may be obtained by any run of the VERB code with parameters of
37 % the grid
38 if(RUN)
39  cd(VERBcodePath)
40  switch(OS)
41  case 'MAC'
42  system('./VERB_code_2.0');
43  case 'WIN'
44  system('VERB_code_2.03.000.exe');
45  case 'LIN'
46  system('./VERB_code_2.0_linux'); % File not created yet
47  end
48  cd('../Setup/');
49 end
50 
51 if(PLOT)
52 cd('../Plot/')
53 run('Plot.m');
54 cd('../Setup/')
55 end
Parameters_structure parameters
Parameters structure, with all parameters from the parameters.ini file. The default parameters define...
Definition: Main.cpp:185