Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
90
|
第三章
Flatten
指令可指定作用層數(level),並將串列展平至該層數。[Page-91]
以上提及的指令都有進階用法,針對其完整說明請參考 Mathematica 教學文件。本書有
許多地方都會使用這些指令,並不另做詳述,如果你仍不甚熟悉,建議花點時間執行上
述範例練習一番。
ch03.indd 90 2014/4/2 上午 05:18:48
3.0 導論
|
91
集合相關指令
Mathematica 中的集合其實就是刪去重複元素的串列,再搭配一系列的集合操作指令:
聯集
Union
交集
Intersection
差集
Complement
等。 素,
Mathematica
SameTest
SameQ
===
符。
Subsets
指令可建立所有子集合的集合。
MemberQ
指令可判斷集合是否擁有該成員,但此
指令還有其他廣泛用途,將於第 4 章再進一步介紹此指令。
用來運算差集
計算所有子集合
向量相關指令
Mathematica 中的向量也以串列實作,為節省記憶體,向量元大多為 0 的稀疏向量可使
SparseArray
指令建立(見訣竅 3.8),矩陣與張量在本質上是以巢狀結構的串列表
示,同
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106