當前位置: 華文世界 > 教育

平學(43):Matlab入門學習之矩陣運算(2)

2024-10-07教育

分享興趣,傳播快樂,增長見聞,留下美好。

親愛的您,

這裏是LearningYard 學苑!

今天小編為大家帶來文章

「平學(43):Matlab 入門學習之矩陣運算」

歡迎您的用心存取!

Share interest, spread happiness, increase

knowledge, leave a beautiful.

Dear you,

this is LearningYard Academy.

Today, the editor brings you an article

"Ping Xue(43):Matlab introductory study of matrix operations(2) "

Welcome to your visit!

一、思維導圖( Mind mapping )

二、學習過程( Learning process )

1. 構建矩陣( Build a matrix )

在構建矩陣的過程中,需要用到英文字元的中括弧「[ ]」和分號「;」,兩個數之間插入空格代表同一行,插入分號代表進入下一列。小編在此處構建了一個矩陣,具體如下圖所示:

In the process of constructing the matrix, you need to use the English characters in brackets 「[ ]」 and semicolon 「;」, insert a space between the two numbers on behalf of the same line, insert a semicolon on behalf of the next column. I have constructed a matrice here, as shown below:

2. max 函式( max function )

該函式用於列舉矩陣每列最大值,具體效果如下圖所示:

The function is used to list the maximum value of each column of the matrix, the specific effect is shown below:

3. sum 函式(sum function )

該函式用於計算矩陣每列和,具體效果如下圖所示:

The function is used to calculate the matrix sum of each column, the specific effect is shown below:

4. mean 函式(mean function )

該函式用於列舉矩陣每列均值,具體效果如下圖所示:

The function is used to enumerate the mean value of each column of the matrix, the specific effect is shown below:

5. sort 函式(sort function )

該函式用於對每列數值進行排序,具體效果如下圖所示:

The function is used to sort the values in each column, the specific effect is shown below:

6. sortrows 函式(sortrows function )

該函式用於依照第一列的數從小到大排序行,具體效果如下圖所示:

The function is used in accordance with the first column of the number of small to large sorting line, the specific effect is shown in the figure below:

7. length 函式(length function )

length 函式用於顯示矩陣最大維度的長,具體效果如下圖所示:

length function is used to display the maximum dimension of the matrix length, the specific effect is shown below:

8. eye 函式(eye function )

該函式用於生成單位矩陣,具體效果如下圖所示:

This function is used to generate the unit matrix, the specific effect is shown below:

9. zeros 函式(zero function )

該函式用於生成a行b列的零矩陣,具體效果如下圖所示:

The function is used to generate a row b column zero matrix, the specific effect is shown below:

10. ones 函式(ones function )

該函式用於生成a行b列的單位矩陣,具體效果如下圖所示:

The function is used to generate a row b column unit matrix, the specific effect is shown below:

11. diag 函式(diag function )

該函式用於指定對角線上的函式,具體效果如下圖所示:

This function is used to specify the function on the diagonal, the specific effect is shown below:

12. 讀取特定位置的元素(Retrieve the element at a specific location )

可透過直接存取矩陣行列來讀取特定值,具體效果如下圖所示:

Specific values can be read by directly accessing the matrix rows and columns as shown below:

今天的分享就到這裏了。

如果您對文章有獨特的想法,

歡迎給我們留言,

讓我們相約明天。

祝您今天過得開心快樂!

That's all for today's sharing.

If you have a unique idea about the article

please leave us a message

Let us meet tomorrow.

I wish you a happy day today!

參考資料:Google 轉譯,百度,通義千問

本文由LearningYard學苑整理發出,如有侵權請在後台留言!

文字 | Ping

排版 | Ping

稽核 | yyz