CHAPTER 2: CREATING ARRAYS Flashcards

1
Q

What is an Array?

A

A fundamental form of MATLAB/OCTAVE uses to store and manipulate data.
Arranged in rows AND/OR columns

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

What is a one-dimensional array?

A

A row OR a column of numbers

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

What is a two-dimensional array?

A

Collection of numbers arranged in rows AND columns

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

What does one-dimensional array represent?

A

Vectors

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

What does two-dimensional array represent?

A

Matrices

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

How to create a row vector?

A

type elements with a space or comma in between (inside a bracket)

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

How to create a column vector?

A

type elements with a semicoln in between them

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

Purpose of linspace command

A

For creating a vector with linear (equal) spacing by specifying the first term, the spacing, and
the last term

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

Purpose of zeros (m,n) and ones (m,n) command

A

creates matrix with m rows and n columns in which all elements are 0 and 1, respectively

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

eye (n)

A

creates square matrix in which DIAGONAL elements are equal to 1 and the rest of elements are 0

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

What is a scalar

A

an array with one element

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

What is a transpose operator?

A

Switches a row (column) vector to a column (row) vector
Just type a quote “ ‘ “

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

Purpose of array addressing

A

Useful when there is a need to redefine only some of the elements

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