matlab code update