Commit 21b1c018 authored by Argyris Kalogeratos's avatar Argyris Kalogeratos

minor code improvements

parent 2c4d7bce
......@@ -25,7 +25,7 @@
% Copyright (c) by Argyris Kalogeratos and Kevin Scaman, 2015.
%---
% INITIALIZATION (run only once - to force initialization, clear the environment first)
%% INITIALIZATION (run only once - to force initialization, clear the environment first)
if (~exist('MATLAB_WORKERS', 'var')) % avoid re-initializations
prepareWorkspace();
end
......
%plotCurves - This function makes line plots for selected evaluation
%measures of each epidemic control strategy.
%
% function plotCurves (results, fieldName, varargin)
% function plotCurves (fResults, fieldName, varargin)
%
% Input:
% - results: a structure with the simulation results per compared strategy.
% - fResults: a structure with the simulation results per compared strategy.
% See invertCellStruct.m for more details.
% - fieldName: it is the evaluation measure that should be plotted.
% - varargin: a list of other optional arguments
......@@ -20,10 +20,10 @@
% Copyright (c) by Argyris Kalogeratos and Kevin Scaman, 2015.
%---
function plotCurves (results, fieldName, varargin)
function plotCurves (fResults, fieldName, varargin)
curveNames = fieldnames(results);
curvesArray = struct2cell(results);
curveNames = fieldnames(fResults);
curvesArray = struct2cell(fResults);
numTests = numel(curvesArray{1});
dt = curvesArray{1}{1}.time(2) - curvesArray{1}{1}.time(1);
numT = max(cellfun(@(s) max(cellfun(@(t) numel(t.time), s)), curvesArray));
......
......@@ -26,7 +26,7 @@ addpath('Var');
poolobj = gcp('nocreate');
% Setup the pool of Matlab workers for parallel processing
MATLAB_WORKERS = 0; % adjust the number of workers to use
MATLAB_WORKERS = 8; % adjust the number of workers to use
if (MATLAB_WORKERS > 0)
if (isempty(poolobj))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment