其实这一部分的内容,在之前的纯函数的那部分已经有所讲到过了,我们再在这里简单说一下。
其实我想说的就是mathematica几个符号的说明,算是一个归纳吧。
文章目录(Table of Contents)
符号:@
@是普通的函数应用
f@1
>> f[1]
符号:@@
@@等价于Apply,默认在第0层的应用
f@@{{a,b},{c,d}}
>> f[{a,b},{c,d}]
符号:@@@
@@@默认是在第一层进行应用
f@@@{{a,b},{c,d}}
>> {f[a,b],f[c,d]}
符号:/@
/@这个符号是函数Map的缩写,下面是最基本的应用
Apply[f,{a,b,c}]
>> f[a,b,c]
这个函数通常和纯函数一起使用,在之前纯函数那里我们也有说明,在这里我们再说明一下。
{#, #} & /@ {1, 2, 3, 4, 5}
>> {{1,1},{2,2},{3,3},{4,4},{5,5}}
- 微信公众号
- 关注微信公众号
-
- QQ群
- 我们的QQ群号
-


![Mathematica入门[13]–Associations(关联)](https://img.mathpretty.com/20210911_162053_3lh8t7l.jpg)
![Mathematica入门[12]–Options(选项)](https://img.mathpretty.com/20210911_162114_futklns.jpg)
![Mathematica入门[10]–Pure Functions(纯函数)](https://img.mathpretty.com/20210911_162018_osipdrw.jpg)
![Mathematica入门[9]–Function Definitions(函数定义)](https://img.mathpretty.com/20210911_161401_9q0dovo.jpg)
![Mathematica入门[8]–Patterns(模式)](https://img.mathpretty.com/20210911_162127_srsayfn.jpg)
![Mathematica入门[7]--Assignments(赋值)](https://img.mathpretty.com/20210911_162031_ifrgvfm.jpg)
![Mathematica入门[6]--Iterators(迭代器)](https://img.mathpretty.com/20210911_162044_qrizd11.jpg)
![Mathematica入门[5]--Lists(列表)](https://img.mathpretty.com/20210911_162025_0gwx5df.jpg)
![Mathematica入门[4]--Symbolic Expressions(符号表达式)](https://img.mathpretty.com/20210911_162124_pk73t7w.jpg)

评论