MATLAB: Can I not integrate this function

integrationnumerical integrationsymbolic integration

I keep getting an error saying "Undefined function 'int' for input arguments of type 'function_handle'."
AND
"Error in Untitled (line 15)
q=int(Ed,0,Tb);"
*How do I fix this error?*
my code:
syms t
Tb=0.018;
s=sin(2*pi*20000*t);
a=(0.6.*sin((pi.*t)/0.018).^2).*s;
b=(1.2.*sin((pi.*t)/0.018).^2).*s;
Ed = @(t) (b-a)^2;
q = int(Ed,0,Tb);

Best Answer

Ed = (b-a)^2;
q = int(Ed,0,Tb);
Or else
Ed = matlabFunction((b-a)^2, 'vars', t);
q = integral(Ed, 0, Tb);
In my test, the first version was quite slow, for reasons I cannot explain as yet.