If you have a Fourier series (i.e. f_i = i f for some f) you can use the Clenshaw recurrence relation which is significantly faster than computing all the sines (but it might be slightly less accurate). In your case you can consider the sequence: f_k = exp( i (...

The Taylor series you use needs x to be expressed in radians. After the input multiply x by π/180 to convert degrees to radians. Also you need to have many iterations, not just x. Try for i=1:1:10 because factorial grows very fast.