Many of the examples I've encountered while looking for an answer are simple functions that do not involve summations.
Suppose I have the following function;
f(n) = sum(n*cos(n-k)) from k=-infinity to infinity
How would I go about making the discrete plot in MATLAB?

