matlab 3.1 Flashcards

1
Q

subplot(m, n, p)

A

breaks figure window into m by n matrix, p is the graph number

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

histogram function

A

graphs histogram with input array and number of bins
histogram(x,5)
x array, 5 bins

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

symmetric error bar function

A

errorbar(x, y, e)
x and y vals, e as error. all inputs must be of same length

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

non symmetric error bars function

A

errorbar(x, y, d, u)
x and y vals, d as the yderr and u as xerr

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

how to adjust thickness of graph lines

A

plot(x, y, ‘LineWidth’, 2.0)

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

plot3 function

A

graphs in three dimensions and takes three inputs:
plot3(x, y, z)

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

meshgrid

A

takes 2 input vectors and creates two 2d matrices for x and y
Xmatrix is copy of x vector over and over, same for y but in columns

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

[X, Y] = meshgrid(x,y)

A

x and y are input veectors
X is the output matrix, Y is output matrix

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

how do you get Z with meshgrid?

A

Z = sin(X) .* cos(Y)

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

surf(x,y,z)

A

shows on three planes with contour lines

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

contour function

A

represents 3D surface using 2D contour

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

how can you create animations

A

with loops

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

linear interpolation

A

uses existing line to estimate value at certain point based off of known points
ex: interp1(x,y,new_x)

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

cubic spine interpolation

A

smooths curve, minimizes eror
ex: interp1(x,y, new_x, ‘spline’)

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

least squares fitting

A

finds best fit for data points based on slope and intersection

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

polyfit function

A

uses least squares fitting to calculate least squares polynomial and create a curve that fits the graph

17
Q

polyval function

A

evaluates the polynomial created by polyfit for a given set of values

18
Q

diff function

A

calculates difference for consecutive elements in an array or matrix