Lectures 12-16 Flashcards

1
Q

ODE 45

A

applies a variable-step classical Runge-Kutta method that is h^4 accurate. Should be the first method to try

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

ode23

A

used for solving moderatley “stiff” equations (example - mass spring dampening with a high spring constant)

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

ode15s

A

should be used for solving stiff equations - potentially less acccurate

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

What is the set up for an ode

A

[x,y]=ode45(‘myfunc’,tspan,y1)
y1 = initial value
tspan = vector limiting the domain for the problem (need to define)(vector)

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

What are some causes of not being a linear equation?

A

squared term

two variables multiplied together

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

What are the three possible outcomes when solving a linear equation?

A
  1. there is a unique solution
  2. there is a non-unique solution (family of solutions)
  3. there is no explicit solution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the commands do to A^-1 of the equation Ax=b?

A

x=inv(A)*b

x=A\b

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

What does a unique solution to a system require?

A

the existence of the inverse A^-1

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

Rank

A

the total number of linearly independent rows in a matrix

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

Singular

A

when a matrix has linearly dependent rows

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

What is another code of inv if the the solution is NaN or Inf

A

pinv(A)

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

sample set

A

a population , numerical sequence of probability and statitics

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

mean

A

average of a sample set, the function ‘ mean ‘ is used

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

median

A

the value which separates a sample set between a lower half and an upper half. matlab code = median

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

standard deviation

A

the neighborhood about the mean value which captures 68% of the population

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

probability distributioin

A

the relative likelihood (as a ratio) of obtaining a specified outcome, x

17
Q

uniform distribution

A

all outcomes are equally probable

18
Q

normal distribution

A

a bell curve probability distribution; the further the outcome is from the mean, the less probable

19
Q

cumulative probability

A

the cumulative (integrated) likelihood of obtaining a specified range of outcomes

20
Q

rand

A

generates a random real number on the open interval (0,1)

21
Q

rand(m,n)

A

generates an m x n array of random numbers

22
Q

randi(imax,m,n)

A

generates an m x n array of random integers between 1 and imax

23
Q

randn

A

generates a random real number using a normal probability distribution

24
Q

randn(m,n)

A

generates an m x n array of random numbers using a normal distribution

25
Q

round(x)

A

rounds x towards the nearest integer

26
Q

fix(n)

A

round x toward zero

27
Q

hist(x,n)

A

plots a histogram where x is the sample and n is the number of bins

28
Q

calculates histogram data

A

[z,y]=hist(x,n)

29
Q

bar(y,z)

A

draws a bar graph that looks like a histogram (especially if y and z are determined using hist command)

30
Q

How do you create a bar graph with the probability of rolling a die (with 6 different sides) with an input for a number of rolls.

A
n=input('number of rolls')
b=1:6 %possible sides of the die
dievalue=randi(6,1,n)
[z,y]=hist(dievalue,b)
bar(y,z)