Function 如何在Mathematica和Matlab中找到定义符号的类型和存储位置?

Function 如何在Mathematica和Matlab中找到定义符号的类型和存储位置?,function,matlab,types,wolfram-mathematica,memory-management,Function,Matlab,Types,Wolfram Mathematica,Memory Management,在Python中,可以找到函数的类型和内存位置: >>> def foobar(x): ... x+1 ... >>> foobar <function foobar at 0xb764d224> >>> >>def foobar(x): ... x+1 ... >>>福巴 >>> Mathematica和Matlab的模拟结果分别是什么?在Matlab中,您可以运行 format debug 在MATLAB

在Python中,可以找到函数的类型和内存位置:

>>> def foobar(x):
...   x+1
... 
>>> foobar
<function foobar at 0xb764d224>
>>> 
>>def foobar(x):
...   x+1
... 
>>>福巴
>>> 
Mathematica和Matlab的模拟结果分别是什么?

在Matlab中,您可以运行

format debug
在MATLAB命令窗口中,强制将变量显示为其内存位置,而不是其值。(这是FORMAT函数的一个未记录(AFAIK)但众所周知的选项。)


查看“帮助格式”以确定当前的显示格式,更重要的是,查看完内存位置后,如何恢复显示格式。

这就是您的意思:例如:a=10??a(顺便说一句,这是Mathematica)如何找到内存位置?如果有办法在Mathematica中获取这些信息,你会怎么做?为什么需要这些信息?看看LibraryLink(Mathematica的C接口)。它可以给你一些这样的信息。