📄 m3_intro.hlp
字号:
{smcl}
{* 18mar2005}{...}
{cmd:help m3 intro}
{hline}
{* index mata commands}{...}
{title:Title}
{p 4 4 2}
{bf:[M-3] intro -- Commands for controlling Mata}
{title:Syntax}
{p 4 4 2}
Command for invoking Mata from Stata:
{col 10} [M-3] entry{col 30}description
{col 10}{hline 55}
{col 10}{...}
. {bf:{help m3_mata:mata}}{...}
{col 30}invoke Mata
{col 10}{hline 55}
{p 4 4 2}
Once you are running Mata, you can use the following commands from the
colon prompt:
{col 10} [M-3] entry{col 30}description
{col 10}{hline 55}
{col 10}{...}
: {bf:{help mata_help:mata help}}{...}
{col 30}execute {cmd:help} command
{col 10}{...}
: {bf:{help mata_clear:mata clear}}{...}
{col 30}clear Mata
{*}{...}
{col 10}{...}
: {bf:{help mata_describe:mata describe}}{...}
{col 30}describe contents of Mata's memory
{*}{...}
{col 10}{...}
: {bf:{help mata_memory:mata memory}}{...}
{col 30}display memory-usage report
{*}{...}
{col 10}{...}
: {bf:{help mata_rename:mata rename}}{...}
{col 30}rename matrix or function
{*}{...}
{col 10}{...}
: {bf:{help mata_drop:mata drop}}{...}
{col 30}remove from memory matrix or function
{*}{...}
{col 10}{...}
{col 10}{...}
: {bf:{help mata_mosave:mata mosave}}{...}
{col 30}create object file
{*}{...}
{col 10}{...}
: {bf:{help mata_mlib:mata mlib}}{...}
{col 30}create function library
{*}{...}
{col 10}{...}
: {bf:{help mata_matsave:mata matsave}}{...}
{col 30}save matrices
{*}{...}
{*}{...}
{col 10}{...}
: {bf:{help mata_matsave:mata matuse}}{...}
{col 30}restore matrices
{col 10}{...}
: {bf:{help mata_matsave:mata matdescribe}}{...}
{col 30}describe contents of matrix file
{*}{...}
{col 10}{...}
: {bf:{help mata_which:mata which}}{...}
{col 30}identify function
{col 10}{...}
: {bf:{help mata_set:mata query}}{...}
{col 30}display values of settable parameters
{*}{...}
{col 10}{...}
: {bf:{help mata_set:mata set}}{...}
{col 30}set parameters
{col 10}{...}
: {bf:{help mata_stata:mata stata}}{...}
{col 30}execute Stata command
{col 10}{...}
: {bf:{help m3_end:end}}{...}
{col 30}exit Mata and go back to Stata
{col 10}{hline 55}
{title:Description}
{p 4 4 2}
When you type something at the Mata prompt, it is assumed to be a Mata
statement -- something that can be compiled and executed -- such as
: {cmd:2+3}
5
{p 4 4 2}
The {cmd:mata} command, however, is different. When what you type is prefixed
by the word {cmd:mata}, think of yourself as standing outside of Mata and
giving an instruction that affects the Mata environment and the way Mata
works. For instance, typing
: {cmd:mata clear}
{p 4 4 2}
says that Mata is to be cleared. Typing
: {cmd:mata set matastrict on}
{p 4 4 2}
says that Mata is to require that programs explicitly declare their
arguments and their working variables; see
{bf:{help m2_declarations:[M-2] declarations}}.
{title:Remarks}
{p 4 4 2}
The {cmd:mata} command cannot be used inside functions. It would make
no sense to code
{cmd:function foo(}...{cmd:)}
{cmd:{c -(}}
...
{cmd:mata query}
...
{cmd:{c )-}}
{p 4 4 2}
because {cmd:mata query} is something that can only be typed at the Mata colon
prompt:
: {cmd:mata query}
{it:(output omitted)}
{p 4 4 2}
See {bf:{help m1_how:[M-1] how}}.
{title:Also see}
{p 4 13 2}
Manual: {hi:[M-3] intro}
{p 4 13 2}
Online: help for
{bf:{help mata:[M-0] intro}}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -