当前位置: 华文世界 > 教育

平学(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