Let's look at one we call 'down_by_ten’.

It’s equal to 100, colon, minus ten, colon,

minus 100. So here we start at a hundred.

We decrease by 10—— we add minus 10 in other words——

until we get to, and don't go below, minus one hundred.

And there's the numbers. Size of this

[CLICKING] is

one by 21. Again, it's a vector.

You always get row vectors with a colon operator. You never get a column vector.

If you want a column vector you have to change it into a column vector,

and we’ll show you how to do that later.

I want to show you a strange thing.

x equals seven colon thee colon one. So innocently I type:

seven colon three colon one, meaning I want to start with seven, I want to change by

three until I get down to one, and I hit return, and I gets this strange thing.

x is this empty matrix.

One by zero.

Well what's the difference, last time I typed seven——

Well here I had a minus three; here I have a plus three——

and there's the problem.

But I want all the numbers that start at 7, get bigger by 3, and end up at 1.

Well there is no such number or numbers.

So it gives us the empty matrix.

Let's see what the size, of x is?

1 by 0, just as it said.

There are other sizes of empty matrices

in MATLAB.

And by “empty matrix” we don't mean a matrix with zeroes in it.

We need a matrix with nothing in it.

Here's how to get that other kind.

[CLICKING] You just type nothing! So we typed x, a left bracket, typed nothing,

and then typed a right bracket, and it shows that it's an empty matrix.

It shows it a little differently here. Let’s look at the size of x.