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';
Figure 5.15: Row Vectors Created with the Index Operator
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 –1 to 1 by 0.5, use the following statement:
u = do(-1,1,.5);