MATLAB: How to calculate Somme of vector elements

sommevector

i would like to calculate the somme k=1:10^5 of 1/k^2,using the command sum, can anyone help me ?

Best Answer

k=1:10.^5;
sum(1./(k.^2))