You should find lots of valuable code on the official website of mathworks. If you are still stuck i have used a website homeworkhelponline.net, im not sure if they are trusted, but did the work for...