Matlab potential distribution