On pointwise and analytic similarity of matrices