h = 6.636e-34; % Planck constant [J*s]

sig = 6.5e-23; % Interaction cross-section [m^2]

c = 2.998e8; % Speed of light [m/s]

lambda_l = 1.064e-6; % Laser wavelength [m]

lambda_p = 0.8e-6; % Pump wavelength [m]

f_l = c/lambda_l;

f_p = c/lambda_p;

Aeff = 5000e-12; % Effective area [m^2]

tau = 250e-6; % Upper-state lifetime of Nd:YAG [s]



Psat = h*f_l*Aeff/(sig*tau);



Ppump = 1; % Pump power [W]

g0 = sig*tau/(2*Aeff)*Ppump/(h*f_p);



T = linspace(0,1);

l = T/2+0.02;

Pout = Psat*T.*(g0./l-1);

plot(T,Pout);