Vectors And Matrices Flashcards

0
Q

linspace (x, y, n)

A

Creates a linearly spaced vector.
x = start
y = end
n = step

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Creating vectors v = x y z

A
v = [x y z]
v = [x,y,z]
v = x:z
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

logspace (x, y, n)

A

Creates a logarithmically spaced function
10^x = start
10^y = end
n = number of elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Indexing

vec (x)

A

Returns the x element in vector vec

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

vec (x:y)

A

Returns elements from x to y inclusive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

vec (x) = y

A

Sets x-th element to y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Creating column vectors

A
v = [x;y;z]
v = [x,y,z]'
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Creating matrices

A
mat = [a,b,c; x,y,z]
mat = [a b c; x y z]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

rand (n)

A

Creates an n x n matrix of random numbers between 0 and 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

rand (m, n)

A

Creates an m x n matrix of random numbers between 0 and 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

randi ([intmin, intmax], m, n)

A

Creates an m x n matrix of random integers between intmin and intmax inclusive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

zeros (m, n)

A

Creates an m x n matrix of zeros.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

ones (m, n)

A

Creates an m x n matrix of ones.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

mat (x, :)

A

Refers to the x-th row

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

mat (:, x)

A

Refers to the x-th column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

mat’

A

Returns the transpose of mat