I am using JSL to stack some data. The columns have Spec Limit properties so I am using JSL to manually stack those values in a matrix to add to the data as well. The problem is I can not seem to assign values to a matrix without defining it. And I can not dynamically define a matrix. Perhaps I am missing something or there are other matrix tricks someone can suggest.
dt0 is the table from which I am operating
i_ncols is determined from the number of rows in another table.
ls_colnames is the list of column names that I want to stack and is generated using another table
ld_targets is the final matrix I wish to generate with this loop
//get targets from column properties
ld_targets = [](3, i_ncols);
For( i = 1, i <= i_ncols, i++,
For( j = 0, j <= 2, j++,
ld_specs = Column( dt0, ls_colnames[i_ncols * j + i] ) << Get Property( "Spec Limits" );
ld_targets[j + 1, i] = ld_specs["Target"];
)
);
this results in a compile error "expected integer for number of columns" and will not even run.
if I do not define the matrix (comment out the first line) I get the runtime error "Nothing to set in access or evaluation of 'Assign' , ld_targets[j + 1, i] = ld_specs["Target"]"
Any suggestions?
thanks in advance
Heather