作业帮 > 综合 > 作业

数学软件Mathematica问题:LabelingFunction -> (Placed[#,Center] &)中的

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/14 14:38:48
数学软件Mathematica问题:LabelingFunction -> (Placed[#,Center] &)中的“#”是什么用法?
在Mathematica中符号 # 和 &  配合一起使用表示纯函数,其中 # 表示在纯函数中的第一个变量.例如计算一个数的平方,用纯函数的表示法就是#^2 &然后可以将此函数作用在一些对象上,In[]:= #^2 & /@ {1, 5, 9} (*对象是列表*)
Out[]= {1, 25, 81}In[]:= Map[#^2 &, a + b + c] (*对象是表达式*)
Out[]= a^2 + b^2 + c^2更多请参考http://reference.wolfram.com/mathematica/tutorial/PureFunctions.html