📜  如何从 SAS IML 矩阵中提取值 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:02.792000             🧑  作者: Mango

代码示例1
proc iml;
A = shape(1:30, 5);     /* 5 x 6 matrix */
scalar = A[2,1];
row = A[2, ];           /* 2nd row */
cols = A[ , {3 1}];     /* 3rd and 1st columns */
matrix =  A[3:4, 1:2];  /* 2 x 2 matrix: (A[3,1] || A[3,2]) // 
                                         (A[4,1] || A[4,2]) */
print A, scalar, row, cols, matrix;