I am trying to plot the following function:

The time interval is to be from 0 to 5 seconds using a step size of 0.002. This is what I have so far...
t = 0:0.002:5;
k = [2; 4; 6; 8];
i = (1/pi) + 0.5*sin(4*t) - (2/pi)*sum((cos(4*k*t))/(k*k-1));
plot(t,i)
It gives me the error:
Error using *
Inner matrix dimensions must agree.
Error in lab1_5 (line 4)
i = (1/pi) + 0.5*sin(4*t) -
(2/pi)*sum((cos(4*k*t))/(k*k-1));
I then tried every use of './' and '.*' but it still gives me the same error. What am I doing wrong?