CH 2 - CREATING ARRAYS Flashcards

1
Q

It is a fundamental form that MATLAB/OCTAVE uses to store and manipulate data. It is a
list of numbers arranged in rows and/or columns.

A

ARRAY

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

is a list of numbers arranged in a row or a column.

A

ONE-DIMENSIONAL ARRAY

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

creating a vector from a known list of numbers:

A

variable_name = [ type vector elements ]

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

To create a row vector, _____________________

A

TYPE THE ELEMENTS WITH A SPACE OR A COMMA BETWEEN THE ELEMENTS INSIDE THE SQUARE BRACKETS

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

To create a column vector, ____________

A

TYPE THE LEFT SQUARE BRACKET AND THEN ENTER THE ELEMENTS WITH A SEMI-COLON BETWEEN THEM, OR PRESS THE ENTER KEY AFTER EACH ELEMENT. TYPE THE RIGHT SQUARE BRACKET AFTER THE LAST ELEMENT

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

How to type elements in a row (example)?
How to type elements in a column (example)?

year (row)
population (column)

A

yr=[1984 1985 1986 1987]
pop=[127; 130; 136; 145]

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