我想知道是否有人知道如何获得具有特定行的矩阵。
例如,我想得到行(1)的矩阵,
垫子将是 [12 59 95]。
Names Default To Here( 1 );<BR />bigclass=Open( "$SAMPLE_DATA/Big Class.jmp" );<BR />mat = bigclass << GetAsMatrix({2,3::5});<BR />Show(mat);垫 =
[ 12 59 95,
12 61 123,
12 55 74,
12 66 145,
12 52 64,
12 60 84,
12 61 128,
12 51 79,
13 60 112,
13 61 107,
13 56 67,
13 65 98,
13 63 105,
13 58 95,
13 59 79,
14 61 81,
14 62 91,
14 65 142,
14 63 84,
14 62 85,
14 63 93,
14 64 99,
14 65 119,
14 64 92,
14 68 112,
14 64 99,
14 69 113,
15 62 92,
15 64 112,
15 67 128,
15 65 111,
15 66 105,
15 62 104,
15 66 106,
16 65 112,
16 60 115,
16 68 128,
17 62 116,
17 68 134,
17 70 172];
根据你在做什么,你也可以使用数据表下标:
mat2 = bigclass[1, {2, 4, 5}]这是执行此操作的一种方法:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << delete columns( {name, sex} );
valueMatrix = dt[1, 0];
Show( valueMatrix );