Numerical Integration at different point

2 visualizaciones (últimos 30 días)
Pritam Sahoo
Pritam Sahoo el 5 de Jul. de 2018
Comentada: Pritam Sahoo el 5 de Jul. de 2018
syms g;
I0_dBm=-12:22;
for jj=1:length(I0_dBm)
var_ni(jj)=(6.09*10^-10*(10^(I0_dBm(jj)/10))*g)+(8.28*10^-14);
fun(jj)=(1/4)*(2.02*10^7)*1.3844*(g^(2.1417))*exp(-(10* (10^(I0_dBm(jj)/10))*(10^-3)*g/(2*sqrt(var_ni(jj))))^2)*erfc((log(g/(0.0068))+0.1821)/sqrt(0.1));
ber(jj)=sym(int(fun(jj),g, 0, Inf));
end
figure
semilogy(I0_dBm,ber,'g-d','LineWidth',2);
I tried this integration but the error is-
  • Error using semilogyConversion to double from sym is not possible.*

Respuesta aceptada

Torsten
Torsten el 5 de Jul. de 2018
I0_dBm=-12:22;
for jj=1:length(I0_dBm)
var_ni=@(g)(6.09*10^-10*(10^(I0_dBm(jj)/10))*g)+(8.28*10^-14);
fun=@(g)(1/4)*(2.02*10^7)*1.3844*(g.^(2.1417)).*exp(-(10* (10^(I0_dBm(jj)/10))*(10^-3)*g./(2*sqrt(var_ni(g)))).^2).*erfc((log(g/(0.0068))+0.1821)/sqrt(0.1));
ber(jj)=integral(fun, 0, Inf);
end
figure
semilogy(I0_dBm,ber,'g-d','LineWidth',2);
  5 comentarios
Torsten
Torsten el 5 de Jul. de 2018
That's very good of you, but not necessary.
Best wishes
Torsten.
Pritam Sahoo
Pritam Sahoo el 5 de Jul. de 2018
Thank You Sir.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by