Is f a symbolic variable? (No.) We see this:
So you created f as symbolic. And people seem to think that having done so, it will stay that way.
But in the very next line, you replace f.
f is now a double variable. Zero, in fact, although the first time through the loop, it will be empty, since rr will be 0.