Abdullah - what do you want to plot? The sum at each iteration of the loop so that you can see the Taylor series converge to the expected solution? If so, then you will have to keep track of each sum from each iteration (step) of the loop. A couple of things - never name a local variable to have the same name as a MATLAB built in function. In this case, use taylorSeries (or something else) instead of sum. Try the following code
x = input('enter the angle: ');
x = x*pi/180; % convert to radians
n = input ('number of terms: ');
func = @(x,k)(((-1)^k)*x^(2*k)/factorial(2*k));
taylorSeries = zeros(n,1);
taylorSeries(1) = func(x,0);
for k = 1:n-1
taylorSeries(k+1) = taylorSeries(k) + func(x,k);
end
plot(taylorSeries);
Try the above and see what happens!