  We conduct gravitational microlensing experiments in a galaxy taken from a
cosmological N-body simulation. Hypothetical observers measure the optical
depth and event rate toward hypothetical LMCs and compare their results with
model predictions. Since we control the accuracy and sophistication of the
model, we can determine how good it has to be for statistical errors to
dominate over systematic ones. Several thousand independent microlensing
experiments are performed. When the ``best-fit'' triaxial model for the mass
distribution of the halo is used, the agreement between the measured and
predicted optical depths is quite good: by and large the discrepancies are
consistent with statistical fluctuations. If, on the other hand, a spherical
model is used, systematic errors dominate. Even with our ``best-fit'' model,
there are a few rare experiments where the deviation between the measured and
predicted optical depths cannot be understood in terms of statistical
fluctuations. In these experiments there is typically a clump of particles
crossing the line of sight to the hypothetical LMC. These clumps can be either
gravitationally bound systems or transient phenomena in a galaxy that is still
undergoing phase mixing. Substructure of this type, if present in the Galactic
distribution of Machos, can lead to large systematic errors in the analysis of
microlensing experiments. We also describe how hypothetical WIMP and axion
detection experiments might be conducted in a simulated N-body galaxy.
