I want to write an algorithm such that what I have attached, I am somehow elementary in writing algorithms with latex. I do not want the exact answer, only a tip or an example similar to what I have attached.

algorithm written in table


You can do any one of the following:

  1. Place the algorithms each in its own minipage environment:

      \begin{algorithm}[H]% Left algorithm
      \begin{algorithm}[H]% Right algorithm
  2. Place the algorithms inside the columns of a larger table.

I've chosen (2) above to produce this (with the help of booktabs:

enter image description here

Symbols and other notation may have to change. It's just to give you an idea of what could be done.

Spoiler alert:


\usepackage[margin=1in]{geometry}% Just for this example





    Efficient application of the wavelet dictionary by the Horner's rule.} \\
    Forward operator $(y = \vectnotation{D} \vect{\vectnotation{X}})$\;
    $\vectnotation{R} \assign \mathbf{1} \otimes \vectnotation{X}(N,:)$\;
    \For{$n \assign 2$ \To{} $N$}{
      $\vectnotation{P} \assign \mathbf{1} \otimes \vectnotation{X}(N-n+1,:)$\;
      $\vectnotation{R} \assign \vectnotation{R} \circ \vectnotation{Z} + \vectnotation{P}$\;
    $\vectnotation{y} \assign \vectnotation{F}^{-1}(\hat{\vectnotation{w}} \circ \vectnotation{R}\mathbf{1})$\;
  \end{algorithm} &
    Adjunct operator $(\vect{\tilde{\vectnotation{X}}} = \vectnotation{D}^{T} \vectnotation{y})$\;
    $\mathbf{\rho} \assign \vectnotation{y}^{T} \vectnotation{W}\vectnotation{F}$\;
    $\vectnotation{L} \assign N \times M$ all-ones matrix\;
    \For{$n \assign 2$ \To{} $N$}{
      $\tilde{\vectnotation{X}}(n,:) \assign \mathbf{\rho} \vectnotation{L}$\;
      $\vectnotation{L} \assign \vectnotation{Z}^{\star} \circ \vectnotation{L}$\;
  \end{algorithm} \\[-\normalbaselineskip]


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.