matlablatextexmaker

Error Exporting Live Script to LATEX


For my weekly meetings I like to create a live script to show to my advisor. This week I decided to try and export to LaTeX

I started with these equations using the MATLAB's equation editor as I could not do it with the the built in LaTeX editor.

Start Picture

When it is transported over to LaTeX it looks like this

\begin{par}
$$A=\text{â}\left\lbrack \begin{array}{cc}
\varepsilon_1  & 1\\
\varepsilon_1  & 1\\
\ldotp \ldotp \ldotp  & 1\\
\varepsilon_n  & 1
\end{array}\right\rbrack$$
\end{par}

\begin{par}
$$x=\left\lbrack \begin{array}{c}
a\left(\lambda \right)\\
b\left(\lambda \right)
\end{array}\right\rbrack$$
\end{par}

\begin{par}
$$Î=\left\lbrack \begin{array}{c}
L_{1\left(\lambda \right)} \\
L_{2\left(\lambda \right)} \\
\ldotp \ldotp \ldotp \\
L_{n\left(\lambda \right)} 
\end{array}\right\rbrack$$
\end{par}

Which obviously gives me error messages due to the symbols.

! Package inputenc Error: Unicode char â (U+2009) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation.

My question is what is going on here? In texmaker it errors on me and in texWorks it just skips it. Is there any way to fix it or will I have to create the matricies again in LaTeX?


Solution

  • The characters â located on the second line and Î located at the last \begin statement are giving you problems due to them being in Unicode. You probably want to remove the \text{â} block in the code and change Î to something else that is ASCII... like the letter B in your image. BTW, this code does not error when I render it online through QuickLaTeX.

    Once I do those changes, I get the following:

    enter image description here

    Minor Note

    The second row of A is probably a typo. You may want to change the subscript of the first column to a 2, not a 1.