function [addedMat]= addMatrices(mat1, varargin)
% ADDMATRICES will add two or more matrices

try
    addedMat = (mat1);
    for i = 2:nargin
        if isempty(varargin{i-1})
            continue
        end
        addedMat = addedMat + (varargin{i-1});
    end
    
catch myException
    throw(myException)
end