From the start Flashcards

1
Q

what is a scalar?

A

a single number

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

what is a vector?

A

a collection of 2 or more numbers in a row or column

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

what is another name for a vector?

A

array

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

How do I acces vectors?

A

Using an index e.g: y(3)

accessing third entry in vector y

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

y(1:3)?

A

index is a vector, accessing entries 1-3 in vector y

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

how do we create a row vector?

A

scalars in vector are separated by spaces when defined

e.g. [1 2 3 4 5]

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

how do we create a column vector ?

A

scalars in vector are separated by semicolons when created

e.g. [1;2;3;4;5]

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

how many types of vectors are there?

A

2 (row and column)

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

how do I convert between row and column vectors?

A

using a ‘tick’ ‘

e.g. z’

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

How do I create equally spaced vectors?

A

by defining start value: step size: end value

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

How do I create equally spaced vectors?

A

by defining start value: step size: end value

e.g. x=0: 2: 10

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

what is the requirement for vector-vector maths?

A

both vectors must have same length

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

what is a script?

A

scripts are a collection of matlab commands stored in a.m file

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

how do you execute a script?

A

simply type the name of the script in the command window and press ‘enter’

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

How do I edit a script?

A

type ‘edit scriptname.m’ (‘scriptname is the name of my script”)

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

what is the plot(x,y) command?

A

creates a plot of the variables x and y ( 1st plot argument is x-axis, 2nd plot argument is the y-axis)

17
Q

what is the hold on command?

A

lets you plot multiple graphs on the same x and y axes

18
Q

legend(‘blabla’)

A

lets you label the legend of the graph

19
Q

title(‘nana’)

A

lets you chose a titlefor your graph