Escaping "^" after \tt is causing formatting error in the following code. All words after \^{} is being affected by \tt.
Code:
\item Use the {\tt linspace} command to create a vector $\mathbf{x} \in \mathbb{R}^{100}$ containing 100 equally spaced points between 0 and 10 (inclusive). Use this vector to create the Vandermonde matrix $\mathbf{D} \in \mathbb{R}^{100 \times 4}$ with rows $\begin{bmatrix} 1 & x_i & x_i^2 & x_i^3 \end{bmatrix}$ for $i = 1,\dots,100$. (Hint: While using {\tt x\^{}n} will result in an error, using {\tt x.\^{}n} will return a vector where each element is raised to the $n$th power.) Save the matrix $\mathbf{D}$ as {\tt A4.dat}.
Current output:
Is there a way to resolve this issue?


\ttat all. In this case, I think\verbfits best – Apr 26 '19 at 04:44matlab-prettifier. – Henri Menke Apr 26 '19 at 05:06