【文件属性】:
文件名称:生成矩阵-probability statistics and random processes for electrical engineering 3ed
文件大小:2.22MB
文件格式:PDF
更新时间:2021-06-07 19:03:39
stata
8.1 生成矩阵
8.1.1 输入新矩阵
可以直接录入一个新的矩阵
matrix A= (1,0,1\2,1,0\-3,2,-5) //录入矩阵 A
matrix list A //显示录入的矩阵 A
matlist A //显示录入的矩阵 A,该命令只能在 stata9 以上版本使用
matrx B=(1+1,2*3/4 \ 5/2, 3^2)
matrix list B
matrix C=(2,3,4)
matrix E=(1\2\3)
matrix F=(4)
matrix rownames A= sex edu marriage
matrix colnames A=obs1 obs2 obs3
matrix list
8.1.2 生成特定格式矩阵
生成一个 5 行 3 列的矩阵 A,矩阵中的元素均为 0
matrix A=J(5,3,0)
生成一个 6 阶单位阵 I
matrix I=I(6)
生成一个 3 行 5 列的随机矩阵 R,每个随机元素均服从(0,1)均匀分布
matrix R=matuniform(3,5)
matrix d=(1,4,9)
matrix D=diag(d) //以d中元素为对角元素生成对角矩阵D
matrix list D
8.1.3 数据与矩阵之间的相互转化
将矩阵 R 转换为数据文件
网友评论
相关文章
- Probability, Statistics, and Random Processes For Electrical Engineering, 3ed
- 数据重整-probability statistics and random processes for electrical engineering 3ed
- 复习和练习-probability statistics and random processes for electrical engineering 3ed
- 启用和退出-probability statistics and random processes for electrical engineering 3ed