function ret = squares(n) ret = (1:n) .^ 2;