Since you haven't showed us your besselzero function, we can't run your code. But if I had to guess:
f1 = symsum(2*exp(-ram(k)^2*tau)/(ram(k)^3*besselj(1,ram(k))), k, 1, 11);
Don't use symsum here. What I think you're doing is along the line of:
>> symsum(x(k), k, 1, 10)
Error using sym/subsindex (line 855)
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and
function body must be sym expression.
If I'm right, just use sum. This works even if the array you're trying to sum is symbolic. Just use element-wise operations, compute all the elements of the "body" of your symsum at once, and sum.
k^10 + k^9 + k^8 + k^7 + k^6 + k^5 + k^4 + k^3 + k^2 + k
snipped the rest of the code