gpt4 book ai didi

wolfram-mathematica - Mathematica 中的批量输入和输出?

转载 作者:行者123 更新时间:2023-12-04 11:59:14 36 4
gpt4 key购买 nike

最近发现了一些old post在 MathGroup 上使用未记录的命令行选项 -batchinput-batchoutput显示:

 If test.mma contains the following commands:

a=2+2
b=10!;
a+b

then, running Mathematica in batch mode, only output for the first and
third commands goes to stdout:

# math -batchinput -batchoutput < test.mma

4

3628804

但是当试图在 Windows 下重现这种行为时,我只在控制台窗口中打印了第一个输出。我究竟做错了什么?

最佳答案

我测试了它并得到了两个数字作为输出。 然而 ,如果最后一个命令后面没有回车,输出就是你贴出来的!

因此,请检查您是否以回车符结束最后一行。

关于wolfram-mathematica - Mathematica 中的批量输入和输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6542537/

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