Overview of induction for matrices
The first case to understand induction is of the trivial representation $Y(h)=1$ of $H$ to its parent group $G$. The result of the induction are permutation matrices $X(g)$ describing how $G$ permutes the cosets $G/H$. Each row has one nonzero entry, and that entry is of the form $Y(h)$. The location of those nonzero entry describes the action of $g$ on $G/H$.
For one-dimensional representations, we get almost the same thing, except $Y(h)$ is not always 1. We still get monomial matrices: one nonzero entry per row and column, and the locations still describe the permutation action of $g$ on $G/H$, while the nonzero entries are related to $Y$ of the “leftover”.
For finite-dimensional representations (say dimension $d$), we get almost the same thing, except $Y(h)$ is not a single number, but a matrix block. So $X(g)$ is a block matrix. Each block is $d \times d$, and on each row of blocks all but one is zero. The nonzero blocks are of the form $Y(h)$, and the position is the same as before: it describes the permutation action of $g$ on $G/H$.
In detail: Choose $g_i \in G$ such that every $g \in G$ has a unique representation of the form $g_i h$ for $i \in G/H$ and $h \in H$. Then $X(G)$ is a block matrix, each block is indexed by $i,j \in G/H$. Consider the $j$th column of $X(g)$: $g g_j = g_i h$ for some unique $i \in G/H$ and $h \in H$ since $g g_j \in G$. In the $j$th column, the only nonzero entry for $X(g)$ is in the $i$th row, and its value is $Y(h)$.
Index two dihedral case
If $g \in H$, then the permutation matrix is $\begin{bmatrix} 1 & 0 \\0 & 1 \end{bmatrix}$ or as a picture, $\begin{bmatrix} * & . \\ . & * \end{bmatrix}$.
If $g \notin H$, then the permutation matrix is $\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$ or as a picture, $\begin{bmatrix} . & * \\ * & . \end{bmatrix}$.
I'll choose a particularly simple transversal, $g_1 = 1$ and $g_2 = g$ for some reflection $g$, so that I consider $G/H=\{1,2\}$. $D_8$ is generated by $g$ and $z$, so it suffices to describe their two matrices:
To calculate $X(z)$, we look at the first column $z g_1 = z = g_1 z$, so first column has only one nonzero entry, $Y(z) = \begin{bmatrix}0&-1\\1&0\end{bmatrix}$, and it is in the first row. The second column is similar, $z g_2 = g_2 z^{-1}$, so the second column has only one nonzero entry, $Y(z^{-1}) = \begin{bmatrix}0&1\\-1&0\end{bmatrix}$, and it is on the second row.
$$X(z) = \begin{bmatrix} Y(z) & 0 \\ 0 & Y(z^{-1}) \end{bmatrix} = \left[\begin{array}{rr|rr} 0 & -1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 1 \\ 0 & 0 & -1 & 0 \end{array}\right]$$
To calculate $X(g)$, we look at the first column $g g_1 = g = g_2 1$, so first column second row is $Y(1)$. Then we look at the second column $g g_2 = 1 = g_1 1$, so second column first row is $Y(1)$.
$$X(g) = \begin{bmatrix} 0 & Y(1) \\ Y(1) & 0 \end{bmatrix} = \left[\begin{array}{rr|rr} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \hline 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{array}\right]$$
A similar formula holds for all dihedral groups, the only difference is the specific matrix for $Y(z)$ needs to be a rotation matrix of order $n$, not just order $4$.
A fairly similar formula holds for all index 2 subgroups, but you have to be careful on two points: “$Y(z^{-1})$” is really $Y(g^{-1} z g)$ in general, and “$Y(1)$” is really $Y(g^2)$, since $g^2 \in H$. Also $H$ need not be cyclic, so you might have to calculate more than one $X(z)$, but they are use this same modified formula.
In general, as long as the index is small, the calculations are not too bad. If the index is large, then the matrices are very large too, and it may be better to use “blackbox” linear algebra instead trying to store the matrix entries (even in a compressed format for sparse matrices).
Extending a dihedral representation
Let a rotation of maximal order have matrix $Z$. We propose there is some matrix $A$ for a reflection. If there was, it would satisfy the equations $AZ = Z^{-1}A$ (which are really $n^2$ linear equations equating all of the entries). Generally this is under-determined, so we add the quadratic equation $A^2 = 1$.
For instance if $Z=\begin{bmatrix} 0 & -1 \\ 1 & 0\end{bmatrix}$ and $A=\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}$ then we get equations $a_{12} = a_{21}$ and $-a_{11} = a_{22}$ from looking at the top row of $AZ=Z^{-1}A$, and we get $a_{22}=-a_{11}$ and $-a_{21}=-a_{12}$ (both redundant) from the second row. From $A^2 = 1$ and the previous equations we get the single equation $a_{21}^2 + a_{22}^2 = 1$ (the top-left entry; the off diagonals are automatically 0, and the bottom-right entry is the same as the top-left).
Now any solution is fine, so we take $a_{22}=1$, so that $a_{21}=0$, $a_{12}=0$ and $a_{11}=-1$.
Note how there are many other solutions, though, an entire circle's worth.
In general, it can be quite difficult to decide whether a representation of a subgroup extends to the whole group. I am not aware of any reasonable algorithm for finding such aan extension if it does exist.