I need to compute using the taylor series but i must also name the function, i have looked around and from what i can understand this is how i thought it needs to be done:

%x- the argument

%N – the initial number of terms in the expansion

function[x N]=ty_cos(x,N)

for x=1:N

y=feval(taylor(cos(x)))

end

end

either my understanding of this is very wrong or my coding is wrong seeign as it doesnt work, all i need to be able to do, is create the taylor series expansion of cos(x) for the amount of terms N