  Micro-Pattern Gaseous Detectors (MPGDs) such as Micromegas or GEM are used in
particle physics experiments for their capabilities in particle tracking at
high rates. Their excellent position resolutions are well known but their
energy characteristics have been less studied. The energy resolution is mainly
affected by the ionisation processes and detector gain fluctuations. This paper
presents a method to separetely measure those two contributions to the energy
resolution of a Micromegas detector. The method relies on the injection of a
controlled number of electrons. The Micromegas has a 1.6-mm drift zone and a
160-$\mu$m amplification gap. It is operated in Ne
95%-iC$\mathrm{_4}$H$\mathrm{_{10}}$ 5% at atmospheric pressure. The electrons
are generated by non-linear photoelectric emission issued from the photons of a
pulsed 337-nm wavelength laser coupled to a focusing system. The single
electron response has been measured at different gains (3.7 10$\mathrm{^4}$,
5.0 10$\mathrm{^4}$ and 7.0 10$\mathrm{^4}$) and is fitted with a good
agreement by a Polya distribution. From those fits, a relative gain variance of
0.31$\pm$0.02 is deduced. The setup has also been characterised at several
voltages by fitting the energy resolution measured as a function of the number
of primary electrons, ranging from 5 up to 210. A maximum value of the Fano
factor (0.37) has been estimated for a 5.9 keV X-rays interacting in the Ne
95%-iC$\mathrm{_4}$H$\mathrm{_{10}}$ 5% gas mixture.
