fVec

The function x=fVec(A,type) vectorizes the matrix A in different fashions:

TypeDescription
1With

    \[A=\left(\begin{array}{cccc}a_1&a_{n+1}&\cdots&a_{(m-1)n+1}\\\vdots& \vdots&  \vdots&  \vdots\\a_n&a_{2n}&\cdots&a_{mn}\end{array}\right)\]

the function yields

    \[x=\left(\begin{array}{ccc}a_1\\\vdots\\a_{mn}\end{array}\right)\]

2With

    \[A=\left(\begin{array}{ccc}a_1&\cdots&a_n\\a_{n+1}&\cdots&a_{2n}\\\vdots&\vdots&\vdots\\a_{(m-1)n+1}&\cdots&a_{mn}\end{array}\right)\]

the function yields

    \[x=\left(\begin{array}{ccc}a_1\\\vdots\\a_{mn}\end{array}\right)\]

3With

    \[A=\left(\begin{array}{ccccc}a_1&a_2&a_4&a_7&\cdots\\a_2&a_3&a_5&a_8&\ddots\\ a_4&a_5&a_6&a_9&\ddots\\a_7&a_8&a_9&a_{10}&\ddots\\ \vdots&\ddots &\ddots  &\ddots  &\ddots \end{array}\right)\]

the function yields

    \[x=\left(\begin{array}{ccc}a_1\\\vdots\\a_{\frac{n(n+1)}{2}}\end{array}\right)\]

4 With

    \[A=\left(\begin{array}{ccc}0&-a_3&a_2\\a_3&0&-a_1\\-a_2&a_1&0\end{array}\right)\]

the function yields

    \[x=\left(\begin{array}{ccc}a_1\\a_2\\a_3\end{array}\right)\]

Previous page