I suggest that instead of using
f = str2func(['@(x)' vectorize(f)]);
that you use
However, you could just comment out all of your handling of f, as you never use f after you make it into a function handle.
At this point your y is a symbolic variable. integral() cannot be applied to symbolic variables: you would need to use int(y, -t, t) -- which is a value you can easily predict will be 0, since the integral of y with respect to y over y = a to y = b is 1/2 b^2 - 1/2 a^2 and with a = -t and b = -t that is going to be 1/2 t^2 - 1/2 (-t)^2 which is going to be 0.