i want to calculate qdot for a range of x values and plot it. but it gives matrix dimensions must agree error if i use range of x values instead of single x. i tried putting dot before *. how to modify the code for x=0:0.01:0.5 and add a plot(x,qdot) in the end?
k=10;x=0.25;a=@(u) exp(-(k*x)./u);q1=integral(a,0,1);b=@(u) exp(-(0.5*k-k*x)./u);q2=integral(b,0,1);c=@(u,t) (1./u).*exp(-abs(k*x-t)./u);q3=integral2(c,0,1,0,0.5*k);qdot=2*pi*k*(1128.09*q1+1128.09*q2+3221.939*q3-2*3221.939)
Best Answer