Characterization of inhomogeneous polyacrylamide hydrogels