hw5 half done, + matlab code