Effect of calcium and magnesium on dendritic potentials