Update unaryEnergy3.m