Working with Matrices |
Index Vectors |
You can create a row vector by using the index operator (:). The following statements show that you can use the index operator to count up, count down, or to create a vector of character values with numerical suffixes:
r = 1:5; s = 10:6; t = 'abc1':'abc5';
To create a vector based on an increment other than 1, use the DO function. For example, if you want a vector that ranges from to by , use the following statement:
u = do(-1,1,.5);
Copyright © SAS Institute, Inc. All Rights Reserved.