Skip to Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
110
|
第三章
3.7 操作矩陣的行與列
問題點
你想新增、移除或修改矩陣的行或列。[Page-110]
解決方案
許多串列的操作(包含矩陣等高維度串列)並不會修改輸入串列,而是輸出處理後的新
串列。例如,
Append[myList,10]
將輸出新串列,而不會更改到
myList
串列,但有時候
你就是想要修改原始串列。
建立5乘5的零矩陣
設定第2行為{1,2,3,4,5}
設定第3列為3
設定3乘3的子矩陣為9
ch03.indd 110 2014/4/2 上午 05:19:08
3.7 操作矩陣的行與列
|
111
你也許會需要新增元素、列向量或行向量。[Page-111]
新增行向量
新增列向量
討論說明
這種會改變輸入的破壞性操作應盡量避免,因為這很容易導致難找的錯誤。其一,這使
得程式碼對執行順序十分敏感;其次,你必須謹記這些操作是作用在符號上而不是串列
上。意指為何?讓我們檢查
AppendTo
指令的屬性。
ch03.indd 111 2014/4/2 上午 05:19:08
112
|
第三章
把重點放在
HoldFirst ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mathematica Cookbook

Mathematica Cookbook

Sal Mangano
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9789863470106