and will take up less of the space. And if you want to save your data in a

human-readable format, then you type save hello.text, the variable V and then

-ascii. So this will save it.

As text, or as ASCII formatted text. And now, once I've done that, I have this

file, hello.txt is just appeared on my desktop.

And if I open this up, you see that this is a text file with my, with my data

saved away. So that's how you load and save data.

Now, let's talk a bit about how to manipulate data.

Let's set A equal to that matrix again. So there's my 3 by 2 matrix.

Let's start by indexing, so if I type A(3,2), this indexes into

the three comma two element of the matrix A.

So this is what a, this is, you know, normally we would write this as A

subscript 3, 2 or A subscript, you know, 3,

2. And so, that's the element in the third

row and second column of A, which is the element 6.

And I can also type A(2, ): to fetch everything in the second row. So the

colon means every element along that row or column.

So, A(2, ): is this second row of A. Right?

And similarly, if I do A(:, 2), then this means get everything in the second column

of A. So, this gives me 2, 4, 6 by this means

of A, everything comma second column,

so this is my second column of A which is 2, 4, 6.

Now, you can also use somewhat most sophisticated indexing operations. So,

so, I'll just quickly show you an example.

You, you do this maybe less often, but let me do A([1 3], ),: this means, get

all the elements of A, whose first index is 1 or 3.

This means get everything from the first and third rows of A and from all

columns. So this was the matrix A, and so A([1 3], ): means get everything from the

first row and from the second row and, and from the third row.

And colon means, you know, I want both the first and the second columns and so

this gives me this 1, 2, 5, 6. Although you, you, use these sorts of

more sophisticated indexing operations, maybe somewhat less often.

To show you what else we can do. Here's the A matrix,

and let's, this was a colon comma to give me the second column.

And you can also use this to do assignments.

So I can take the second column of A and assign that to ten, eleven, twelve.

And if I do that, I'm now, you know, taking the second column with A and I'm

assigning this column vector 10, 11, 12 to it.

So now A is this matrix that's 1, 3, 5, and the second column has been replaced

by 10, 11, 12. And here's another operation, it's A

let's set A, that's A to be equal to A comma, 100, 101, 102, like so, and, what

this will do, is it appends another column n vector to the right.

So now oops, I think I made a mistake. Should I put semicolons there?

And now, A is equal to this. Okay? I hope that makes sense.

So this 100, 101, 102, this is a column vector.

And what we did was, we said AA take A and set it to the original definition and

then we put that column vector to the right and so we ended up taking the

matrix A and which was this, these six elements on the left.

So we took the matrix A and we appended another column vector to the right, which

is now Y, now A is a 3 by 3 matrix that looks like that.

And finally, when we click that I sometimes use do A and then just a colon

like so, this is a somewhat special case syntax.

what this means is that, puts all elements of A into a single column vector

and this gives me a 9 by 1 vector that just has all the algorithms of A

[INAUDIBLE] together. just, a couple more examples.

I can also, let's see.

Let's say I set A to be equal to 1, 2, 3, 4, 5, 6, again. And, let's see I

said B to be equal to 11, 12, 13, 14, 15, 16.

I can create a new matrix C as [A B] and this just means, so here's my matrix A,

here's my matrix B, and off a set C to be equal to AB.

What I'm doing is I'm taking these two matrices and just concatenating them onto

each other. And so the left, [INAUDIBLE] matrix A on

the left. And I have the matrix B on the right.

And that's how I form this, you know? this matrix C, by putting them together.

I can also do C = [A; B]. The semi colon notation means that means,

it, means go put the next thing at the bottom. So we do sequence A sem colons B

it also puts the matrices A and B together, except that it now puts them on

top of each other, so now you have A on top and B at the bottom and C here, is

now a 6 by 2 matrix. So, so just saying, the semi colon thing

usually means you go to the next line. So C is comprised by A and then go to the

bottom of that and then put B, the bottom and by the way, this AB is the

same as A, B and so, you know, either of these gives you the same result.

So, with that, hopefully you now know how to construct matrices and hopefully this

starts to show you some of the commands that you can use to quickly put together

matrices and take matrices and, you know, slam them together to form big, bigger

matrices. And with just a few lines of code, octave

is very convenient in terms of how quickly we can assemble complex matrices

and move data around. So that's it for moving data around, in

the next video we'll start talk about how to actually do complex computations on

this, on, on, on our data. So hopefully that gives you a sense of

how, with just a few commands, you can very quickly move data around in Octave.

You know, load and save vectors and matrices or load and save data put

together matrices create bigger matrices indexed into or select specific elements

of the matrices. I know I went through a lot of commands,

so I think the best thing for you to do is afterwards to look at the transcript

of the things I was typing, you know, look at the, look at the

coursework sign and download the transcript of the session from there.

And look for the transcript and type some of those commands into Octave yourself,

so that you can start to play with these commands and get it to work.

And obviously, you know, there's no point at all to try to memorize all these

commands, it's just, but what you should do is hopefully from

this video you have gotten a sense of the sorts of things you can do, so that when,

later on, when you're trying to program a learning algorithms system yourself.

If you are trying to find a specific amount that maybe you think Octave can do

because you think you might see it here you should refer to the, to the

transcript of the session and look through that in order to find the

commands you want to use. So, that's it for moving data around and

in the next video, what I'd l like to do is start to tell you how to actually do

complex computations on our data and how to compute some data and how to actually

start to implement learning algorithms.