laser rate equations matlab code
e span tspan = [0 1e-6]; % 1 microsecond % Initial conditions vector Y0 = [N0; Phi0]; % Solve the differential equations [t, Y] = ode45(@(t, Y) laserRateEq(t, Y, params), tspan, Y0); ``` Visualizing Results Plot the evolution of population inversion and photon density over time. ``