该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


The matrix concatenation operators, || and |/, add columns or rows to a matrix dynamically. However, the script runs faster if you define a matrix in a static fashion instead.
t1 = Tick Seconds();
A = J( 10, 10000, . );
a2 = J( 10, 1, Random Gamma( 1, 1 ) );
// define a2 to be a 10 by 1 vector of random gamma values.
A[0, i] = a2;
/* populate the ith column of the matrix A to have the
t2 = Tick Seconds();
Show( t2 - t1 );
t3 = Tick Seconds();
B = J( 10, 0, . );
a2 = J( 10, 1, Random Gamma( 1, 1 ) );
t4 = Tick Seconds();
Show( t4 - t3 );
Delete Symbols( a1, a2 );
t1 = Tick Seconds();
a1 = J( 100000, 1, Random Uniform() );
t2 = Tick Seconds();
Show( t2 - t1 );
t3 = Tick Seconds();
a2 = J( 0, 0 );
For( i = 1, i <= 100000, i++,
a2 |/= Random Uniform()
t4 = Tick Seconds();
Show( t4 - t3 );