Intergrating from negative infinity to infinity
Afficher commentaires plus anciens
Hello,
I am trying to solve an equation where limits of intergration are from negative infinity to infinity.
function damp = pmb(zeta)
syms zeta
mu=4*pi*10.^-7;i=1;v=10;w=0.001;%t=0.05; r=0.032;
sigma= 5.8*10.^7; a=mu*sigma; h=0.05;p=0.01; lp=0.1;
k=sqrt(((zeta).^2)+(i*zeta*a*v));
H=(((zeta).^2)./(((zeta).^2)+(k.^2)+(2*abs(zeta)*k*coth(k*w))));
x1=exp(-(abs(zeta))*p); x2=exp(-(abs(zeta))*h);
n=3;
for I=1:n
e1=exp(i*zeta*(1+lp)); e2=exp(i*zeta*1);
jr=(1./(4*pi*((zeta).^2))).*(e1-e2)*(-i).^(n-1);
end
A=jr*mu*(1-x1)*x2;
z=(abs(zeta*A)).^2;
S= z*real(H);
end
i get the following error, while using quad function damp=quad('pmb',-inf,inf)
"The integrand function must return an output vector of the same length as the input vector."
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!