Question: Error Bad Index Into Vector

I've just encountered a problem that I've never seen before, although I suspect I'm overlooking something very simple, and I was hoping to get clarification. In the course of defining a function I wanted to have a sum going over the indices of a vector; something like, sum(abs(x[i]-y[i])^2,i=1..3), and I receive "error, bad index into vector." This construct works fine with the seq command, so I'm not totally sure why it fails when using the sum command. Any ideas would be greatly appreciated. Thank you. Keenan
Please Wait...