Hi there,
@jthi provided an answer with hard to find syntax. I am adding on a bit as an FYI. Being a senior citizen, I still like the concept of allocating space for matrix stoage and releasing unused. It saves the need to concatenate, and might be a time savings especially for potentially large matrices.
Also, I think a simple method to create matrices is to use JMP's J function, it is listed in the Scripting Index > Functions > Matrix.
Below is a simple script demonstrating its use. FYI.
Names Default To Here( 1 );
m1x2 = J( 1, 2, 0 ); // a 1x2 matrix of zeros
m2x1 = J( 2, 1, Empty() ); // a 2x1 matrix all empty values
Show( m1x2, m2x1 );
imax = 100;
jmax = 1000;
//like an ALLOCATE or DIM
mm = J( imax, jmax, Empty() );
//within the program logic and counting say imax = 5 and jmax =3;
imax = 5;
jmax = 3;
//like a redimension
mm = mm[1 :: imax, 1 :: jmax];
Show( mm, N Col( mm ), N Row( mm ) );