study matlab(4)
来源:互联网 发布:双十一淘宝大数据 编辑:程序博客网 时间:2024/06/05 16:18
杜勒矩阵:
A = [16 3 2 13; 5 10 11 8; 9 6 7 12; 4 15 14 1]
A =
16 3 2 13
5 10 11 8
9 6 7 12
4 15 14 1
sum(A):矩阵A中每一列求和 得到结果。
ans =
34 34 34 34
矩阵转置A'
a n s =
16 5 9 4
3 10 6 15
2 11 7 14
13 8 12 1
s u m ( A ' ) '
a n s =
34
34
34
34
sum(A,2)
ans =
34
34
34
34
ans =
34
34
34
34
d i a g ( A )
a n s =
16
10
7
a n s =
16
10
7
1
翻转矩阵元素
fliplr(A)
ans =
13 2 3 16
8 11 10 5
12 7 6 9
1 14 15 4
13 2 3 16
8 11 10 5
12 7 6 9
1 14 15 4
magic 函数,可以产生指定大小的矩阵(和杜勒矩阵形式相同)
B = m a g i c ( 4 )
B =
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
B =
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
调换下顺序就可以变成杜勒矩阵:
A = B(:,[1 3 2 4])
MATLAB software provides four functions that generate basic matrices.
zeros All zeros
ones All ones
rand Uniformly distributed random elements
randn Normally distributed random elements
矩阵的运算符
+ Addition
- Subtraction
. * Element-by-element multiplication
. / Element-by-element division
. \ Element-by-element left division
. ^ Element-by-element power
. ' Unconjugated array transpose
对于一些基本的简单的数学函数,利用help elfun 查询
- Subtraction
. * Element-by-element multiplication
. / Element-by-element division
. \ Element-by-element left division
. ^ Element-by-element power
. ' Unconjugated array transpose
对于一些基本的简单的数学函数,利用help elfun 查询
一些复杂的数学计算和矩阵函数,利用help specfun 和help elmat进行查询查看
0 0
- study matlab(4)
- MATLAB Study
- study Matlab(3)
- VBA Study(4)
- OpenGL Study 4
- awk study(4)
- Vim Tutorial Study(4)
- vc-study-4
- jQuery study note 4
- php study 4 array
- study
- study
- study
- study
- STUDY
- Study
- study
- study
- Go开发笔记
- 解决XCode6.1 iOS8.1使用storyboard屏幕适配问题
- Linked List Cycle II
- 走向面试之数据库基础:一、你必知必会的SQL语句练习-Part 1
- Linux的标准输入、输出,错误
- study matlab(4)
- java中的X509EncodedKeySpec类
- 走向面试之数据库基础:一、你必知必会的SQL语句练习-Part 2
- OPENERP创建用户(权限设置、密码修改)
- log4net 配置备忘
- MongoDB 新建数据库用户例子
- Win764如何搭建服务器
- 二叉树的非递归遍历
- Windows7下配置简单的nginx服务器