简体   繁体   English

如何在Mathematica中声明变量并在以后使用

[英]How to declare variable in Mathematica and use them later

I am very new to Mathematica and I was curious about how one can declare variable and use them later in function. 我是Mathematica的新手,我很好奇如何声明变量并稍后在函数中使用它们。 I tried to do as below but I'm getting empty result in Graph 我尝试执行以下操作,但在Graph中得到的结果为空

Here I've declared two variable one and two and tried to use them later but it didn't output the result. 在这里,我声明了两个变量1和2,并尝试稍后使用它们,但没有输出结果。 在此处输入图片说明

Thanks in advance. 提前致谢。

Try this 尝试这个

one:=3*x^2/2;
two:=x;
Show[Plot[one/two,{x,0,15}],ListPlot[{1,3,7,9,10,11,14}]]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM