hi. i am new here. can someone help me out here. there are errors in my code. can someone fix them

1 visualización (últimos 30 días)
function H = FF(I)
%segma_N=10.^-7;
a = 2; %Alpha
b = 2; %Beta
c = 0.2; %Gamma
d = 0.8; %Big omega prime
k = 1;
z = 4; %Propagation Distance
%segma_db = 8; %Atmospheric attenuation coefficient
segma = (8*0.115129255);
p_db =0:1:30; %power
p = 10.^(p_db/10);
%R = 0.5; %Optoelectronic conversion factor
s = 0.3; %Zero boresight
I1 = exp(-segma*z); %Atmospheric attenuation
Aperture_radius = 0.1; %Aperture_radius
segma_s = 0.2; %Jitter standard deviation
omega_z = 2.5; %Beam Width
v = (sqrt(pi)*Aperture_radius)/(sqrt(2)*omega_z);
omega_zeq = sqrt((omega_z.^2*(sqrt(pi)*erf(v)))/(2*v*exp(-v.^2)));
g = omega_zeq/(2*segma_s);
A = ((2*a.^(a/2))/(c.^(1+a/2)*gamma(a)))*(((c*b)/(c*b+d)).^(b+a/2));
A0 = (erf(v)).^2;
ak = (nchoosek(b-1,k-1))*(((c*b+d).^(1-k/2))/gamma(k))*((d/c).^(k-1))*((a/b).^(k/2));
%% for plus part
g0 = (((a*b*I)./((c*b+d)*A0*I1)).^(p-(a-k)./2))./(gamma(p-(a-k)+1)*factorial(round(p)));
m0 = (-omega_zeq.^2)./(4*(p+k-g.^2));
e0 = exp(((-omega_zeq.^2)*s.^2)./(8*(p+k-g.^2)*segma_s.^2));
%% for minus part
g1 = (((a*b*I)./((c*b+d)*A0*I1)).^(p+(a-k)./2))./(gamma(p+(a-k)+1)*factorial(round(p)));
m1 = (-omega_zeq.^2)./(4*(p+a-g.^2));
e1 = exp(((-omega_zeq.^2)*s.^2)./(8*(p+a-g.^2)*segma_s.^2));
%%for inside summation
p = 0:p;
s0 = sum((g0*m0*e0)-(g1*m1*e1));
%final summation
k = 1:b;
term1 = (ak.*I.^((a+k)./(2-1)))./(((A0.*I1).^((a+k)/2)).*sin(pi*(a-k)));
final = term1*s0;
s1 = sum(final);
% final returnb equation
H = ((2*pi*g.^2*A*exp((-s.^2)./(2*segma_s.^2)))./(omega_zeq.^2))*s1;
end
  2 comentarios
David Hill
David Hill el 31 de Ag. de 2020
What is the input, I? Equations for g0 and g1 do not work. p is a 1x31 array with final element 1000. factorial(1000) will not work. What are you trying to do here, p=0:p?
rana zain
rana zain el 31 de Ag. de 2020
i have sent you personal text. The files are interlinked. it would be better if you can please check ib.
I have written three matlab file :
  1. integration.m file for the integration inside equation 14 .
  2. FI_I.m file for the equation 14 and call the integration function (integration.m) inside it.
  3. non_zero_o.m file for finally write a code for plotting the equation 16 where I tried to call the function for equation 14
I am trying to plot a figure similar the given Fig.1 for non-zero boresight pointing error (details is given on the pdf) using the equation 14 and 16. And for Zero-boresight pointing error using the equation 13 and 16.
N.B: In zero-boresight (equation 13) there is a function named Meijer for which I am stuck to write the code.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by