English 中文(简体)
贴在变数后名下的文件名称
原标题:Putting to a Filename named after a variable

I am using Put (>>) to store information that I am obtaining in Mathematica. The problem is that I am putting a several variables. However, if I do the following, it outputs to a file called year rather than my variable.

例如:

year=64;
sortedTally>>year;

出口到一个名为<条码>的文档 而不是一个名为<代码>64的文件。 文件指出,<代码>expr >> filename相当于expr >>“filename。 是否有办法绕过这一点,是否把根据变数作出的改变列入档案? 这一点在

最佳回答

在这种情况下,需要使用<条码>。

问题回答

暂无回答




相关问题
Solving vector equations in Mathematica

I m trying to figure out how to use Mathematica to solve systems of equations where some of the variables and coefficients are vectors. A simple example would be something like where I know A, V, and ...

Introspection of messages generated in Mathematica

Is there any way to get at the actual messages generated during the evaluation of an expression in Mathematica? Say I m numerically solving an ODE and it blows up, like so In[1] := sol = NDSolve[{x [...

Connecting points in Mathematica

I have a collection of points displayed in a graphic: alt text http://img69.imageshack.us/img69/874/plc1k1lrqynuyshgrdegvfy.jpg I d like to know if there is any command that will connect them ...

Mathematica, PDF Curves and Shading

I need to plot a normal distribution and then shade some specific region of it. Right now I m doing this by creating a plot of the distribution and overlaying it with a RegionPlot. This is pretty ...

Targeted Simplify in Mathematica

I generate very long and complex analytic expressions of the general form: (...something not so complex...)(...ditto...)(...ditto...)...lots... When I try to use Simplify, Mathematica grinds to a ...

热门标签