Added several comments in matlab code