%This function uses a custom global function to save specifed figures.
% Inputs: 
%     figure_vector : figure handels in vectorform
%     dir: directory where figures should be saved (string)
%
% Written by: Knut Åge Meland
% Email: knutagemeland@gmail.com

%%

function save= save_figure(figure_vector, dir)
    for fig = figure_vector
        figure(fig)
        filename = ['figure', num2str(fig),'.pdf'];
        save2pdf([dir, filename]);
    end
end