I want to compute the sum of 1/((1^2)(3^2))+ 1/((3^2)(5^2))+1/((5^2)(7^2))+ ...
The following code is my attempt at computing that sum with no looping:
n = 1000;
t0 = clock; %vectorizing we get
x1 = (1./(1:2:n)).^2;
y1 = (1/(3:2:n)).^2y1.*x1;
t = sum(y1.*x1)etime(clock,t0)
But MATLAB gives an error that the vector sizes do not agree.
How can I fix this to get the correct answer?