  Spectral measures arise in numerous applications such as quantum mechanics,
signal processing, resonances, and fluid stability. Similarly, spectral
decompositions (pure point, absolutely continuous and singular continuous)
often characterise relevant physical properties such as long-time dynamics of
quantum systems. Despite new results on computing spectra, there remains no
general method able to compute spectral measures or spectral decompositions of
infinite-dimensional normal operators. Previous efforts focus on specific
examples where analytical formulae are available (or perturbations thereof) or
on classes of operators with a lot of structure. Hence the general
computational problem is predominantly open. We solve this problem by providing
the first set of general algorithms that compute spectral measures and
decompositions of a wide class of operators. Given a matrix representation of a
self-adjoint or unitary operator, such that each column decays at infinity at a
known asymptotic rate, we show how to compute spectral measures and
decompositions. We discuss how these methods allow the computation of objects
such as the functional calculus, and how they generalise to a large class of
partial differential operators, allowing, for example, solutions to evolution
PDEs such as Schr\"odinger equations on $L^2(\mathbb{R}^d)$. Computational
spectral problems in infinite dimensions have led to the SCI hierarchy, which
classifies the difficulty of computational problems. We classify computation of
measures, measure decompositions, types of spectra, functional calculus, and
Radon--Nikodym derivatives in the SCI hierarchy. The new algorithms are
demonstrated to be efficient on examples taken from OPs on the real line and
the unit circle (e.g. giving computational realisations of Favard's theorem and
Verblunsky's theorem), and are applied to evolution equations on a 2D
quasicrystal.
