gpt4 book ai didi

wolfram-mathematica - 数学 : How to prevent evaluation of In[-1]?

转载 作者:行者123 更新时间:2023-12-04 08:15:20 26 4
gpt4 key购买 nike

当我尝试使用 In[-1] 在 Wolfram Mathematica 5.2 中获取最后一个输入表达式时我得到评估输出:

In[1]:= On[In]
2 + 2
In[-1]

Out[2]= 4

During evaluation of In[1]:= In::trace: In[-1] --> In[$Line-1]. >>

During evaluation of In[1]:= In::trace: In[$Line-1] --> In[2]. >>

During evaluation of In[1]:= In::trace: In[2] --> 2+2. >>

Out[3]= 4

如何以未评估的形式获取输入表达式?

最佳答案

你可以试试 InString[]

In[1]:= 2 + 2
Out[1]= 4

In[2]:= InString[-1]
Out[2]= "\\(2 + 2\\)"

关于wolfram-mathematica - 数学 : How to prevent evaluation of In[-1]?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5027012/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com