  We consider a natural basis of the Iwahori fixed vectors in the Whittaker
model of an unramified principal series representation of a split semisimple p-
adic group, indexed by the Weyl group. We show that the elements of this basis
may be computed from one another by applying Demazure-Lusztig operators. The
precise identities involve correction terms, which may be calculated by a
combinatorial algorithm that is identical to the computation of the fibers of
the Bott-Samelson resolution of a Schubert variety. The Demazure-Lusztig
operators satisfy the braid and quadratic relations satisfied by the ordinary
Hecke operators, and this leads to an action of the affine Hecke algebra on
functions on the maximal torus of the L-group. This action was previously
described by Lusztig using equivariant K-theory of the flag variety, leading to
the proof of the Deligne-Langlands conjecture by Kazhdan and Lusztig. In the
present paper, the action is applied to give a simple formula for the basis
vectors of the Iwahori Whittaker functions.
