I need numerical value of Eb_avg, instead matlab is giving symbolic expression and is not performing the integrals
Following is my code:
clc; clear all; close all;neta=0.75; rho=0.5; T=1e-3;P_No_dB=15; P_No_end=size(P_No_dB);in=P_No_end(1,2);P=10.^(P_No_dB./10); sigma_sq=1; Ebmax=100*1e-3; d0=1; m=3; var_hsd=(d0^(-m)); d1=2; m=3; var_hse=(d1^(-m)); d2=2; m=3; var_hed=(d2^(-m)); R=2; SNRth=2^R; count=0;beta=(2^R-1).*sigma_sq./(P.*(1-rho));lambda_0=1/(var_hsd);lambda_1=1/(var_hse);lambda_2=1/(var_hed);Eb=[];for j=1:in syms x y fun=(T*lambda_2.*((x-y.*(1-rho))./(y.*(1-rho))).*sigma_sq.*( expint(lambda_2.*(T.*(x-y.*(1-rho)).*sigma_sq)./(y.*(1-rho).*(T.*neta.*rho.*P.*y +Ebmax))) -expint(lambda_2.*((x-y.*(1-rho)).*sigma_sq)./(y.*(1-rho).*(neta.*rho.*P.*y))) ) -T.*neta.*rho.*P.*y.*( exp(-lambda_2.*(T.*(x-y.*(1-rho)).*sigma_sq)./(y.*(1-rho).*(T.*neta.*rho.*P.*y +Ebmax))) - exp(-lambda_2.*((x-y.*(1-rho)).*sigma_sq)./(y.*(1-rho).*(neta.*rho.*P.*y))) )).*lambda_1.*lambda_0.*exp(-lambda_1.*y).*exp(-lambda_0.*x);fun1=int(fun,y,beta,x/(1-rho));Eb_avg=int(fun1,x,0,Inf);Eb=[Eb Eb_avg];count=count+1end
Best Answer