fsolve stopped because the problem appears regular
Mostrar comentarios más antiguos
Hi.
I want to find the value of w_s and N_s(s is subscript ) in the equations that are attached.
Please refer to the attachment.
I've written the code for it as follows
clc
clear all
c = 2.99792458e8; % velocity of light [cm/s]
Qt = 500; %total quality factor
Qi = 14300; %intrinsic quality factor
Qp = 10000; %crossport quality factor
lambda0 = 1554e-9; %free space wavelength
deltalambda = 0.01e-9; %step
lambda_start = 1540e-9; %start wavelength
lambda_end = 1560e-9; %end wavelength
lambda = lambda_start:deltalambda:lambda_end;
omega = 2*pi*c./lambda;
omega0 = omega(find(lambda==lambda0)); %omega0 equals 1.2121e15
gamai = omega0./2/Qi; %intrinsic loss rate
gamap = omega0./2/Qp; %cross port loss rate
gamat = omega0./2/Qt; %total loss rate
gamac = gamat-gamai-gamap; %cavity loss rate
gama1 = gamac./2;
gama2 = gama1;
rB = 0.2 ;
tB = sqrt(1-rB^2);
P=-1;
COS2 = 0.5*gama1./gama1.*tB^2/rB-0.5*tB^2/rB-rB;
SIN2 = P*tB./(2.*gama1*rB).*sqrt(4.*gama1.*gama1 - tB^2.*(gamac.^2));
conf = 0.5; %confinement factor
gN =5e-20; %differential gain
Ntr = 1e24; %transparency carrier density
alphai = 1000; %intrinsic factor
alpha=1; %henry factor
sigma = 3; %constant
L = 5e-6; %length
m = 25; %constant
%rR=rB+(2*gama1*exp(COS2+1i*SIN2))/(1i*(omega0-x(2))+gamat);
F=@(x)[
%rB+(2*gama1*exp(COS2+1i*SIN2))/(1i*(omega0-x(2))+gamat);
conf*gN*(x(1)-Ntr)-alphai-(1/(2*sigma*L))*log10(1/(abs(rB+(2*gama1*exp(COS2+1i*SIN2))/(1i*(omega0-x(2))+gamat)))^2);
imag(rB+(2*gama1*exp(COS2+1i*SIN2))/(1i*(omega0-x(2))+gamat))+((2*x(2))/c)*(-c*sigma*alpha*gN*(x(1)-Ntr)/(2*x(2))./c)*L-(2*m*pi)];
x0=[1 1];
x=fsolve(F,x0);
I don't get any output.
please guide me.
1 comentario
mohammad heydari
el 26 de Mzo. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming 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!


