MATLAB: Solving integral equation with differential function

differential equationsintegralsymbolicSymbolic Math Toolbox

I want to solve this equation in matlab. integral(0 to T) is (dB/dt)^2 dt. I know the B and t data and i wrote this codes. But it still wrong. Thanks.
f=1000;
T=1/f;
fun=@(t) (diff(B,t).^2);
Q=integral(fun,0,T);

Best Answer

syms B(t)
f=1000;
T=1/f;
fun=((diff(B,t).^2))==0;
B=dsolve(fun);
Q=integral(matlabFunction(B),0,T);