# Question: write a regular function ie in a function m file...

###### Question details

Write a regular function (i.e. in a function .m file) to calculate the series expansion of cosine(x). The number of terms calculated in the series should be specified in the input list of the function. Write a separate function that determines when the series expansion begins to deviate by at least 10% from the true value of cosine(x) based on the number of terms calculated in the series expansion, n. For n = 1, 2, … 10, determine the values of x where deviation between cosine(x) and the series expansion occur. Display the values in a MATLAB® Table. Create a single, properly-formatted plot that visually shows your results are correct.