📄 mf_transposeonly.hlp
字号:
{smcl}
{* 28mar2005}{...}
{cmd:help mata transposeonly()}
{hline}
{* index transposition}{...}
{* index transpose}{...}
{* index transposeonly()}{...}
{* index _transposeonly()}{...}
{title:Title}
{p 4 4 2}
{bf:[M-5] transposeonly() -- Transposition without conjugation}
{title:Syntax}
{p 8 8 2}
{it:numeric matrix}
{cmd:transposeonly(}{it:numeric matrix A}{cmd:)}
{p 8 8 2}
{it:void}{bind: }
{cmd:_transposeonly(}{it:numeric matrix} {it:A}{cmd:)}
{title:Description}
{p 4 4 2}
{cmd:transposeonly(}{it:A}{cmd:)}
returns {it:A} with its rows and columns interchanged.
When {it:A} is real, the actions of {cmd:transposeonly(}{it:A}{cmd:)} are
indistinguishable from coding {it:A}{cmd:'}; see
{bf:{help m2_op_transpose:[M-2] op_transpose}}. The returned result is
the same, and the execution time is the same, too.
When {it:A} is complex, however,
{cmd:transposeonly(}{it:A}{cmd:)} is equivalent to coding
{cmd:conj(}{it:A}{cmd:')}, but {cmd:transposeonly()} obtains the result
more quickly.
{p 4 4 2}
{cmd:_transposeonly(}{it:A}{cmd:)}
interchanges the rows and columns of {it:A} in place -- without use of
additional memory -- and returns the transposed (but not conjugated)
result in {it:A}.
{title:Remarks}
{p 4 4 2}
{cmd:transposeonly()} is useful when you are coding in the programming,
rather than the mathematical, sense. Say you have two row vectors,
{cmd:a} and {cmd:b}, and you want to place the two vectors together in a
matrix {cmd:R}, and you want to turn them into column vectors. If {cmd:a}
and {cmd:b} were certain to be real, you could just code
{cmd:R = (a', b')}
{p 4 4 2}
The above line, however, would result in not just the organization but also the
values recorded in {cmd:R} changing if {it:a} or {it:b} were complex. The
solution is to code
{cmd:R = (transposeonly(a), transposeonly(b))}
{p 4 4 2}
The above line will work for real or complex {cmd:a} and {cmd:b}.
If you were concerned about memory consumption, you could instead code
{cmd:R = (a \ b)}
{cmd:_transposeonly(R)}
{title:Conformability}
{cmd:transposeonly(}{it:A}{cmd:)}:
{it:A}: {it:r x c}
{it:result}: {it:c x r}
{cmd:_transposeonly(}{it:A}{cmd:)}:
{it:input:}
{it:A}: {it:r x c}
{it:output:}
{it:A}: {it:c x r}
{title:Diagnostics}
{p 4 4 2}
{cmd:_transposeonly(}{it:A}{cmd:)}
aborts with error if {it:A} is a view.
{title:Source code}
{p 4 4 2}
{view transposeonly.mata, adopath asis:transposeonly.mata};
{cmd:_transposeonly()} is built-in.
{title:Also see}
{p 4 13 2}
Manual: {hi:[M-5] transposeonly()}
{p 4 13 2}
Online: help for
{bf:{help m2_op_transpose:[M-2] op_transpose}};
{bf:{help mf__transpose:[M-5] _transpose()}};
{bf:{help m4_manipulation:[M-4] manipulation}}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -