Example 1 creates an annual ts, from the year 1 to the year 24, with values 21 to 44.
Example 2 creates a quarterly ts, from the first quarter of 1985 to the last quarter of 2000, with values 1 to 24.
Note that the data are given as a row vector in example 1 and a column vector in example 2: it doesn't matter, provided that you don't give a matrix with more than one dimension.
Example 3 creates a half-yearly ts, from the second half-year of 1985 until a date determined by the length of the -supposed-vector y and with values equal to that of vector y.