  We study the matter effects to neutrino oscillations \nu_\mu \to \nu_e and
\nu_\mu \to \nu_\mu at very long baselines. It has been observed that, for a
very long baseline L~10000 km, the resonance peak for the \nu_\mu \to \nu_e
oscillation and the local minimum of the \nu_\mu survival probability occurs at
similar energies. With a good knowledge on the absolute value of \Delta
m_{31}^2, measurements of the above oscillation probabilities, P_{\mu e} and
P_{\mu\mu}, can be performed with the neutrino energy tuned to the resonance
peak of the \nu_\mu \to \nu_e oscillations. We show that the variations of CP
violating phase and the solar neutrino mixing parameters have negligible
effects on P_{\mu e} and P_{\mu\mu} for such a long baseline. Hence P_{\mu e}
and P_{\mu\mu} together determine the mixing angles \theta_{13} and
\theta_{23}. Around the resonance peak for \nu_\mu \to \nu_e oscillations, the
dependencies of P_{\mu e} and P_{\mu\mu} on the above mixing angles are worked
out in detail, and the implications of such dependencies are discussed.
