function printMatrix(M)
% Print the values in matrix M

[nr,nc]= size(M);
for r = 1:nr
    for c = 1:nc
        fprintf('%10.4f ', M(r,c))
    end
    fprintf('\n')
end
