Added matlab write SS script