A MATLAB optimization of a semiconductor laser output power to minimize an unwanted output pulse.