Update weight2.m