Write a MATLAB code for the following problem:

determine the number of terms necessary to approximate cosx to 8 significant figures using the Maclaurin series approximation. use x=0.3pi

cosx=1−(x2/2)+(x4/4!)−(x6/6!)+(x8/8!)