Electrical resistance in inhomogeneous samples during electroporation