Matlab/Octave中所有内置符号的列表 [英] List of all built-in symbols in Matlab/Octave

查看:79
本文介绍了Matlab/Octave中所有内置符号的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mathematica中,可以通过执行命令

In Mathematica one can get the names of all built-in functions starting with, for instance, List by executing the command

Names["List`*"]

此外

Names["context`*"] 

列出指定上下文中的所有符号.例如.

lists all symbols in the specified context. E.g.

Names["Global`*"] 

提供所有内置符号的名称(以及用户在全局上下文中定义的名称).

gives the names of all the built-in symbols (as well those defined by the user in Global context if any).

Matlab/Octave中是否有类似的结构?

Are there similar structures in Matlab/Octave?

推荐答案

在Octave中,您可以使用以下功能:

In Octave you can use the following functions:

__operators__              : Undocumented
__keywords__               : Undocumented
__builtins__               : Undocumented
__list_functions__         : Return a list of all functions (.m and .oct functions) in the load path or in the specified directory.
localfunctions             : Return a list of all local functions, i.e., subfunctions, within the current file.

和未记录的函数__dump_symtab_info__,该函数转储包含不同作用域中的函数和变量名称的符号表:

And undocumented function __dump_symtab_info__ that dumps symbol table that contains function and variable names in different scopes:

__dump_symtab_info__ (scope)               : Dump symbol table of the given scope
__dump_symtab_info__ (__current_scope__)   : Dump symbol table of the current scope
__dump_symtab_info__ ("functions")         : Dump globally visible functions from symbol table
__dump_symtab_info__ ("scopes")            : List available scopes
__dump_symtab_info__ ()                    : Everything

这篇关于Matlab/Octave中所有内置符号的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆