1

I want to find the number of rows a matrix has in order to iterate over the rows using a FOR loop.

But when I use the dim command it returns me a list with two elements, and I do not know how to store the first into a variable.

How could I store the number of rows of [A] into say the variable I?

Jsevillamol
  • 2,425
  • 2
  • 23
  • 46

1 Answers1

2

Just store the result into a list and then extract the first element of the list.

:dim([A]→L1
:L1(1→I
Codoscope
  • 892
  • 1
  • 10
  • 18