1

I want the equation to properly show the argmin tag with variable at the bottom inside a table. In my case it is showing as a subscript. I tried everything but cant get this done. The following is a part of my code compiling fine but not as desired

\multicolumn{4}{l}{ $\begin{array} {lcl} \mathbf{r}^i \longleftarrow \argmin_\mathbf{r}\;\Vert \mathbf{r}  \Vert_1 \;\;\;\;\mbox{subject to}\;\;\;\;   \mathbf{y}= \mathbf{A}\mathbf{r} \end{array} $ }
\begin{tabular}{ll|l|l|l|} \hline
\multicolumn{5}{l}{Algorithm:}                                                    \\ \hline
\multicolumn{5}{l}{\begin{tabular}[l]{@{}l@{}}Inputs: CS measurement vector for a speech frame $\mathbf{y}$ \\ Outputs: predictor $\mathbf{a}^i$, residual $\mathbf{r}^i$ \\ $i$ = 0, \\ Initialize dictionary: $h^i=rand, \mathbf{H}^i= conv(h)$             \\\end{tabular}} \\ 
\hline
\multicolumn{5}{l}{\textbf{while} halting criterion false \textbf{do}}        \\ 
\multirow{2}{*}{1.}           &                          \\
                              & \multicolumn{4}{l}{$\begin{array} {lcl} 
                              \mathbf{x}^i =\mathbf{H}^i\mathbf{r}^i \end{array}$}                           \\
2.                            & \multicolumn{4}{l}{
$\begin{array} {lcl} \mathbf{a}^i \longleftarrow \argmin_\mathbf{a} \; \Vert \mathbf{r}\Vert_2 + \gamma\Vert\mathbf{a}\Vert_1 \;\;\; \mbox{subject to}\;\; \mathbf{x}^i=\mathbf{X}^i\mathbf{a+r} \end{array}$\vspace{1em}}                        \\
\multirow{4}{*}{3.}           & \multicolumn{4}{l}{\; \mbox{Estimate the vocal tract impulse response}}                         \\
                              & \multicolumn{4}{l}{
                             $\begin{array} {lcl} 
                              h^{i+1} \;\; \mbox{given the predictior estimate}\;\;\mathbf{a}^i \end{array}$}                           \\
                              & \multicolumn{4}{l}{$\begin{array} {lcl}
                              \mathbf{H}^{i+1}= [conv(h^{i+1})] \end{array}$ 
                                            }            \\
                              & \multicolumn{4}{l}{$\begin{array} {lcl}
                              i=i+1; \end{array}$         }                              \\
\multicolumn{5}{l}{\textbf{end while}} \\ \hline                                        
\end{tabular}

enter image description here

Desired Output need argmin with variable at bottom not as subscript like this enter image description here

  • 4
    It is very hard to see either the intention or the problem with a code fragment. Please edit the question to be a complete document starting \documentclass and describe the required output from the document. – David Carlisle Mar 28 '14 at 12:05
  • It mostly depends on how you define \argmin. Without this information it's impossible to give advice. But, please, make an example that can be compiled. – egreg Mar 29 '14 at 12:35
  • If you defined \argmin as an operator - Command for argmin or argmax?, then you may have to issue \displaystyle inside your array in order for it to be properly set underneath it. – Werner Apr 6 '14 at 15:41
4

A reasonable way to define \argmin is via the \DeclareMathOperator command of amsopn loaded most conveniently via mathtools. To get limits to behave like those on \lim you should use the starred version of the declaration:

\DeclareMathOperator*{\argmin}{argmin}

Then in displayed mathematics limits will be placed under the text "argmin". If you are in inline mathematics you can use \limits or \displaystyle to get this effect:

Sample argmins

\documentclass{article}

\usepackage{mathtools}
\DeclareMathOperator*{\argmin}{argmin}

\begin{document}

\( \argmin_r \) vs.\ \( \argmin\limits_r \),
\begin{equation*}
  \argmin_r
\end{equation*}
and \( \displaystyle\argmin_r \).

\end{document}

For your sample code, you seem to be trying to display an algorithm. I would strongly suggest you use the algorithm and algorithmic packages for this rather than multiple tabulars. Without knowing exactly what your algorithm is something like the following seems to be close to the desired output:

Sample output

\documentclass{article}

\usepackage{algorithm,algorithmic,mathtools}

\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}

\DeclareMathOperator*{\argmin}{argmin}
\DeclareMathOperator{\conv}{conv}

\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}

\begin{algorithm}
  \caption{Example algorithm}
  \begin{algorithmic}[1]
    \REQUIRE CS measurement vector for a speech frame \( \mathbf{y} \)
    \ENSURE predictor \( \mathbf{a}^i \), residual \( \mathbf{r}^i \)
    \STATE \( i=0 \)
    \STATE Initialize dictionary: \( h^i=\text{rand} \), \(
    \mathbf{H}^i= \conv(h) \)
    \STATE \( \mathbf{r}^i \longleftarrow \argmin\limits_{\mathbf{r}}
    \norm{\mathbf{r}}_1 \) subject to \( \mathbf{y}=
    \mathbf{A}\mathbf{r}   \)
    \WHILE{halting criterion false}
    \STATE \( \mathbf{x}^i =\mathbf{H}^i\mathbf{r}^i \)
    \STATE \( \mathbf{a}^i \longleftarrow \argmin\limits_{\mathbf{a}}
    \norm{\mathbf{r}}_2 + \gamma\norm{\mathbf{a}}_1  \) subject to \(
    \mathbf{x}^i=\mathbf{X}^i\mathbf{a+r} \)
    \STATE Estimate the vocal tract impulse response
    \STATE \( h^{i+1} \) given the predictior estimate \( \mathbf{a}^i \)
    \STATE \( \mathbf{H}^{i+1}= [conv(h^{i+1})] \)
    \STATE \( i=i+1 \)
    \ENDWHILE
  \end{algorithmic}
\end{algorithm}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.