We aim to study local rigidity and deformations for the following class of groups: the semidirect product $\Gamma=\bm{Z}^{n}\rtimes_{A}\bm{Z}$ where $n\geq 2$ is an integer and $A$ is a hyperbolic matrix in $\SL{n}{Z}$ , considered first as a lattice in the solvable Lie group $G=\bm{R}^{n}\rtimes_{A}\bm{R}$ , then as a subgroup of the semisimple Lie group $\SL{n+1}{R}$ . We will notably show that, although $\Gamma$ is locally rigid neither in $G$ nor in $H$ , it is locally $\SL{n+1}{R}$ -rigid in $G$ in the sense that every small enough deformation of $\Gamma$ in $G$ is conjugated to $\Gamma$ by an element of $\SL{n+1}{R}$ .