Added a pdf and a m-file for mathlab