How to integral function and plot it
Mostrar comentarios más antiguos
Hi, Could you help me how to integral function "fun" and get the q, then plot dL vs q. The code as below. Thanks a lot.
clear all; close all; clc
Gamma = 1;
kappa = 0.75*Gamma;
Dp = 0*Gamma;
Dc = 0*Gamma;
Finese = 350;
OD0 = 0.025;
OD = (Finese/pi)*OD0;
G = OD;
Oc = 2*Gamma;
Op = 0.00001*Gamma;
T0 = 1;
rR = 0*Gamma;
dL = linspace(-6*Gamma,6*Gamma,2000);
kappat = -i*kappa/2+Dp-dL-df;
Gammat = -i*Gamma/2-dL-df;
gammat = -i*rR/2+Dc-dL-df;
Gammaf = 0.00001*Gamma;
A = -4*gammat.*Gammat;
T = T0*(kappa/2)^2.*...
abs((A+Oc^2)./((G^2*gammat)+(kappat.*(A+Oc^2)))).^2;
fun = @(df) (exp(-(df^2/Gammaf^2))/(sqrt(pi)*Gammaf))*T;
q = integral(fun,-Inf,Inf)
figure(1)
plot(dL, q)
xlabel ('dL')
ylabel('Transmission signal')
2 comentarios
Sergey Kasyanov
el 21 de Jun. de 2021
Editada: Sergey Kasyanov
el 21 de Jun. de 2021
Are kappat, Gammat, gammat functions of df?
What is dL? Why is it array?
Tina Hsiao
el 23 de Jun. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Gamma Functions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
