Matrix Control Structures (MATRIX-END MATRIX command)

The matrix language includes two structures that allow you to alter the flow of control within a matrix program.

  • The DO IF statement tests a logical expression to determine whether one or more subsequent matrix statements should be executed.
  • The LOOP statement defines the beginning of a block of matrix statements that should be executed repeatedly until a termination criterion is satisfied or a BREAK statement is executed.

These statements closely resemble the DO IF and LOOP commands in the IBM® SPSS® Statistics transformation language. In particular, these structures can be nested within one another as deeply as the available memory allows.