% A script to calculate the number of ebola survivors in Guinea, Liberia
% and Sierra Leone given case and death statistics from WHO

%% Read in Files

% data for suspected, probable, and confirmed cases
cases = load('ebolaCases.csv');

% data for deaths
deaths = load('ebolaDeaths.csv');

%% Compute Number of Survivals

% call function
survivals = calcsurvival(cases,deaths);

%% Plot Survival Curves

figure(1)
plot(survivals)
title('Cumulative Number of Ebola Survivors')
ylabel('Number of Survivors')
xlabel('Days')
legend('Guinea','Liberia','Sierra Leone', 'Location', 'southoutside', 'Orientation', 'horizontal')

%% Save Data to File

save ebolaSurvival.dat survivals -ascii
