In this paper the operation of a photonic crystal Fano laser is analyzed and simulated. In this simulation, the propagation equations are solved using the finite difference method. The dynamical behavior of the laser is demonstrated for two regimes of operation, continuous-wave and self-pulsing. In order to optimize laser operation, the nanocavity field confinement factor has been swept and its effects on the laser operation is investigated. Based on our simulations by changing this confinement factor from 0.1 to 0.32, the maximum energy, full width at half maximum and frequency variations of 0.27 pJ, 0.009 ns and 0.738 GHz in the output signals are respectively observed.