Loop G rows of a matrix
I'm trying to pull G number of rows from an array. The For loop is not working. It gives me the whole array instead.
I'm trying to pull G number of rows from an array. The For loop is not working. It gives me the whole array instead.
In your attempt you never access a single row of the matrix. Here some comments:

I assume that when G=3 you want the program to return the top three rows of your matrix - independent from the setting of ORIGIN.
If you insist on using a for-loop you could do it that way using the row operator:

Personally I would prefer using a more generic utility function where the number of rows is an additional function argument:

But what exactly do you have against the "submatrix" function?

P11 file attached
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.