Aims. In this work we develop a technique to obtain high precision
determinations of both metallicity and effective temperature of M dwarfs in the
optical.
Methods. A new method is presented that makes use of the information of 4104
lines in the 530-690 nm spectral region. It consists in the measurement of
pseudo equivalent widths and their correlation with established scales of
[Fe/H] and Teff.
Results. Our technique achieves a rms of 0.08±0.01 for [Fe/H],
91±13 K for Teff, and is valid in the (-0.85, 0.26 dex), (2800, 4100
K), and (M0.0, M5.0) intervals for [Fe/H], Teff and spectral type
respectively. We also calculated the RMSEV which estimates uncertainties
of the order of 0.12 dex for the metallicity and of 293 K for the effective
temperature. The technique has an activity limit and should only be used for
stars with logLHα/Lbol<−4.0. Our method is available
online at \url{http://www.astro.up.pt/resources/mcal}.Comment: Accepted in Astronomy and Astrophysics. Updated one important
reference in the introduction. Some typos correcte