Changed matlab files such that they work on both Linux and Windows.