mf_rows.hlp
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 85 行
HLP
85 行
{smcl}
{* 15mar2004}{...}
{cmd:help mata rows()}
{hline}
{* index rows()}{...}
{* index cols()}{...}
{* index length()}{...}
{* index length}{...}
{title:Title}
{p 4 4 2}
{bf:[M-5] rows() -- Number of rows and number of columns}
{title:Syntax}
{p 8 8 2}
{it:real scalar}
{cmd:rows(}{it:transmorphic matrix P}{cmd:)}
{p 8 8 2}
{it:real scalar}
{cmd:cols(}{it:transmorphic matrix P}{cmd:)}
{p 8 8 2}
{it:real scalar}
{cmd:length(}{it:transmorphic matrix P}{cmd:)}
{title:Description}
{p 4 4 2}
{cmd:rows(}{it:P}{cmd:)} returns the number of rows of {it:P}.
{p 4 4 2}
{cmd:cols(}{it:P}{cmd:)} returns the number of columns of {it:P}.
{p 4 4 2}
{cmd:length(}{it:P}{cmd:)} returns
{cmd:rows(}{it:P}{cmd:)}*{cmd:cols(}{it:P}{cmd:)}.
{title:Remarks}
{p 4 4 2}
{cmd:length(}{it:P}{cmd:)}
is typically used with vectors, as in
{cmd:for (i=1; i<=length(x); i++) {c -(}}
... {cmd:x[i]} ...
{cmd:{c )-}}
{title:Conformability}
{cmd:rows(}{it:P}{cmd:)}, {cmd:cols(}{it:P}{cmd:)}, {cmd:length(}{it:P}{cmd:)}:
{it:P}: {it:r} {it:x} {it:c}
{it:result}: 1 {it:x} 1
{title:Diagnostics}
{p 4 4 2}
{cmd:rows(}{it:P}{cmd:)}, {cmd:cols(}{it:P}{cmd:)}, and
{cmd:length(}{it:P}{cmd:)} return a result that is
greater than or equal to zero.
{title:Source code}
{p 4 4 2}
Functions are built-in.
{title:Also see}
{p 4 13 2}
Manual: {hi:[M-5] rows()}
{p 4 13 2}
Online: help for
{bf:{help m4_utility:[M-4] utility}}
{p_end}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?