## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# Chapter 2. Getting Started with the SAS/IML Matrix Programming Language

Contents

• 2.1 Overview of the SAS/IML Language 18

• 2.2 Creating Matrices 18

• 2.2.1 Printing a Matrix 19

• 2.2.2 The Dimensions of a Matrix 20

• 2.2.3 The Type of a Matrix 21

• 2.2.4 The Length of a Character Matrix 22

• 2.3 Using Functions to Create Matrices 24

• 2.3.1 Constant Matrices 24

• 2.3.2 Vectors of Sequential Values 25

• 2.3.3 Pseudorandom Matrices 27

• 2.4 Transposing a Matrix 28

• 2.5 Changing the Shape of Matrices 29

• 2.6 Extracting Data from Matrices 30

• 2.6.1 Extracting Rows and Columns 31

• 2.6.2 Matrix Diagonals 33

• 2.6.3 Printing a Submatrix or Expression 35

• 2.7 Comparision Operators 36

• 2.8 Control Statements 38

• 2.8.1 The IF-THEN/ELSE Statement 38

• 2.8.2 The Iterative DO Statement 39

• 2.9 Concatenation ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required