MATLAB Ch7 Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/43

encourage image

There's no tags or description

Looks like no tags are added yet.

44 Terms

1
New cards

mean - average value of data set

2
New cards

mode - most frequently occurring value in data set

3
New cards

median - middle value in data set

4
New cards

histogram - plots frequency of occurrence of data values vs the values themselves

5
New cards

bin - grouping of data into a subrange necessary to generate a histogram. The choice of the bin width and bin center can drastically change the shape of the histogram. If the number of data values is relatively small, the bin width cannot be small because some of the bins will contain no data and the resulting histogram might not usefully illustrate the distribution of the data.

6
New cards

bar syntax - bar(x,y,'w') (w is the color of the rectangle)

7
New cards

histogram syntax - histogram(y,n) Aggregates the data in the vector y into n bins of uniform width between the minimum and maximum values in y. If you do not put n, it will choose for you

8
New cards

histogram syntax, using white rectangles - histogram(y, 'FaceColor', 'w') or histogram(y, 'FaceColor', 'none') this creates transparent bars

9
New cards

what is a scaled frequency histogram - it is the absolute frequency histogram divided by the total area of that histogram

10
New cards

normal or gaussian function - It is based on the same concept as the scaled histogram; the total area under the curve is 1, and the fractional area gives the probability of occurrence of a specific range of outcomes.

11
New cards

what do you call outcomes that can be described by a normal/bell-shaped curve? - normally distributed

12
New cards

normal probability function - The normal probability function is a two-parameter function; one parameter, mu, is the mean of the outcomes, and the other parameter, sigma, is the standard deviation.

13
New cards

what is the width, or spread, of the curve described by? - the parameter sigma

14
New cards

what is variance? - sigma^2. It is used to describe the spread of the curve. The variance is the square of the standard deviation sigma

15
New cards

P(x<=b) - The probability that the random variable x is less than or equal to b is written as P(x<=b) if the outcomes are normally distributed.

16
New cards

P(a<=x<=b) - The probability that the random variable x is no less than a and no greater than b is written as P(a<=x<=b).

17
New cards

what is the mean of the sum (or difference) of two independent normally distributed random variables equal to? - the sum (or difference) of their means

18
New cards

what is the variance of two independent normally distributed random variables - always the sum of the two variances

19
New cards

how do you obtain a single random number in the open interval (0,1) - rand

20
New cards

how do you keep a result obtained at startup - rng('default')

21
New cards

how do you avoid getting the same random number - rng('shuffle')

22
New cards

how do you make an nxn matrix containing uniformly distributed random numbers between 0 and 1 - rand(n)

23
New cards

how do you generate an mxn matrix containing uniformly distributed random numbers between 0 and 1? - rand(m,n)

24
New cards

how do you generate a single normally distributed random number having a mean of 0 and standard deviation of 1 - randn

25
New cards

how do you generate an nxn matrix of normally distributed random number having a mean of 0 and standard deviation of 1 - randn(n)

26
New cards

how do you generate an mxn matrix of normally distributed random number having a mean of 0 and standard deviation of 1 - randn(m,n)

27
New cards

generate a vector y containing 2000 random numbers normally distributed with a mean of 5 and standard deviation of 3 - 3*randn(1,2000)+5

28
New cards

create a row vector containing a random permutation of integers from 1 to n inclusive - randperm(n)

29
New cards

generate a row vector containing k unique integers selected randomly from 1 to n inclusive - randperm(n,k)

30
New cards

create a mxn matrix containing random integer values between a and b - randi([a,b],[m,n])

31
New cards

create a scalar between 1 and 6 - randi(6)

32
New cards

what is the difference between randperm and randi - randperm returns unique integers, randi integer values may be repeated

33
New cards

generate a row vector containing 9 unique integers selected randomly from 1 to 12 inclusive - randperm(12,9)

34
New cards

return a scalar between 1 and 5 - randi(5)

35
New cards

generate 6 numbers from 1 to 6, but allow it so that the same number may be repeated - randi(6,[1,6])

36
New cards

what is a random walk - a random process that describes a path produced by successive random steps

37
New cards

what is the seemingly random motion of particles in a fluid caused by collisions? - Brownian motion

38
New cards

what is drift - when a walk is more likely to move in a positive or negative direction, it has drift

39
New cards

will randi([-1,2],[1,100]) create a walk with drift? - yes, because it can stay still, move back one space, move forward one space, or move forward two spaces. These are all equal probabilities, but since there are more options for moving forward than backwards, it will walk with drift

40
New cards

x=[7,9,11,12], y=[49,57,71,75] interpolate the value of y when x=8 - interp1(x,y,8) ans=53

41
New cards

x=[0,1], y=[0,2], z=[49,54,53,57] estimate the z value at (0.6, 1.5) - interp2(x,y,z,0.6,1.5) ans=54.55

42
New cards

linear interpolation syntax - interp1(x,y,x_int)

43
New cards

two-dimensional interpolation syntax - interp2(x, y, z, x_i, y_i) estimate value of z at x=x_i and y=y_i

44
New cards

using cubic spline for interpolation - y_int=spline(x,y,x_int) y_int is a vector the same size as x_int containing the interpolated values of y that correspond to x_int