function y = matvec(A,x)
% Basic matrix-vector multiplication
[m,n] = size(A); y = zeros(m,1);
for i=1:m, y(i) = mydot(A(i,:)',x); end
    