Part 1. (36pts) Consider the following MATLAB script, and us…