function combined=performop(op,array1,array2)
% Kevin Baggett
% 2001 Aug 3 18:42:56 UTC
% Performs operation to combine arrays 1 and 2
% Inputs: operation
%         2 arrays
% Output: combined arrays

switch op
    case '+'
      combined=squeeze(array1)+squeeze(array2);
    case '-'
      combined=squeeze(array1)-squeeze(array2);
    case '*'
      combined=squeeze(array1).*squeeze(array2);
    case '/'
      combined=squeeze(array1)./squeeze(array2);
    otherwise
      msgbox('Unknown method!')
end