why integral is not done
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
function output=Hplus(Q,W,a,mutilde)
output=integral(@(u) sqrt(1-u.^2)./(exp(0.5.*abs(Q.*u+W)-a.*mutilde)+1),-1,1,'ArrayValued',true,'RelTol',1e-4);
end
syms Q W a mutlide
output=Hplus(Q,W,a,mutilde)
%% I am trying to run this program but error is come as
%%Error using integralCalc/iterateArrayValued (line 159)
%%Inputs must be floats, namely single or double.
%%Error in integralCalc/vadapt (line 130)
%% [q,errbnd] = iterateArrayValued(u,tinterval,pathlen);
%%Error in integralCalc (line 75)
%% [q,errbnd] = vadapt(@AtoBInvTransform,interval);
%%Error in integral (line 88)
%%Q = integralCalc(fun,a,b,opstruct);
%%Error in Hplus (line 2)
%%output=integral(@(u) sqrt(1-u.^2)./(exp(0.5.*abs(Q.*u+W)-a.*mutilde)+1),-1,1,'ArrayValued',true,'RelTol',1e-4);
%%Error in Untitled2 (line 2)
%%output=Hplus(Q,W,a,mutilde)
4 commentaires
Torsten
le 22 Fév 2019
You could try to use MATLAB's "int" (symbolic integration), but I doubt that your function has an analytical antiderivative.
Bjorn Gustavsson
le 22 Fév 2019
If you dont manage with the exact symbolic integration you could try to make a Taylor-expansion of the root - then I got some explicit values for the integral: int(p(u)/(exp(u)+1),-1,1). You'd still might need to do some variable transformations to clean up your integrand a bit. Integrals like these is what we used handbooks for when I studied solid state physics (too long a time ago...)
HTH
Réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!