hello...
Can anyone tell me how can I simulate the laser rate equation with matlab? i allready wrote a code whics is as follows,
%have to write one editor
function dy=rate_equation(t,y)
dy = zeros(2,1);
I =50e3;
%for t=1:10;
q =1.602e19;
v =9e11;
eps =3.4e17;
N0 =1.8e18;
tn =3e9;
g0 =3e6;
lamda=0.44;
bita=4e4;
tp=1e12;
dy(1)=(I/(q*v))((g0*(y(1)N0)*y(2))/(1+eps*y(2)))(y(1)/tn);
dy(2)=(lamda*g0*(y(1)N0)*y(2))/(1+eps*y(2))(y(2)/tp)((lamda*bita*y(2))/tn);
end
%have to write other editor
%step size=0.01;
clc
tspan=[0,10];
y0=[0,1];
[T,Y]= ode45(@try1,tspan,y0);
plot(T,Y(:,1),'',T,Y(:,2),'.');
title('plot of carrier and photon densities');
xlabel('time');
ylabel('densities');
