function y = up(x,M)
% y = up(x,M); 
% Upsample x by M
%
% Input:  x    - input signal (vector!)
%         M    - upsampling factor
%
% Output: y - output signal

s = size(x);
if s(1) > s(2)
   y = zeros(M*s(1),s(2));
else
   y = zeros(s(1),M*s(2));
end
ylen = length(y);
y(1:M:ylen) = x;

