In the following is a Matlab homework with all details in it, need to be done in 5 days so should be more than enough time