MATLAB: Quad quad i have an equation f=((L*z)/((L/2)+z))*exp((-2*z)/L) where L=10; z=0:10 i need to intergrate this equation from 0 to 10 using quad command. Can someone please help me how to do this?Its urgent. Best Answer L = 10;out = quad(@(z)L*z./(L/2+z).*exp(-2*z/L),0,10); Related SolutionsMATLAB: Quad function i1 = @(t,T)(8*exp(-t/T).* sin(2*pi*t/T)).^2.*(t < T/2)f1 = @(T)quad(@(t)i1(t,T),0,T/2)% e.g. T = 10;out = f1(10) MATLAB: Quad error out = quad(@(x)10*ones(size(x)),0,5)ORout = trapz([0 5],[10 10]) Related QuestionQuad commandUsing quadFace error First input argument must be a function handle in symbolic integralWhile loop in while loop; Shortening
Best Answer