%---------------------------------------------------------
% fcalcQ
%---------------------------------------------------------
% multiply two data series together
%
% [notice that this function only does calculations
% there is NO plotting and NO setting of parameters
%
% All variables and data required by the function are passed
% to it via the input arguments a + b.
% 
% functions should only be used to perform 
% calculations, reading, and writing data.
% They should be as general as possible so have any parameters
% or filenames passed as input arguments, NOT hard wired in the
% code.]
%
%---------------------------------------------------------
function [q] = fcalcQ(a,b)

n1 = length(a);
n2 = length(b);

% use smallest length for length of output arrays
n = min([n1,n2]);

% set up a blank vector
q = zeros(n,1);

% multiply a and b together
for i=1:n
  q(i) = a(i)*b(i);
end

end
