



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Commands, Functions and Special Characters that pertain to plotting Class: CMPSC 200 - Programming for Engineers with MATLAB; Subject: Computer Science; University: Penn State - Main Campus;
Typology: Quizzes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Creates a linear x-y plot. Can also be used as plot(x1,y1,x2,y2) to plot two sets of data Can also plot arrays. ex. plot(x,[y1;y2...]) to plot multiple sets of data Can also plot complex numbers TERM 2
DEFINITION 2 adds 'string' as a title to a plot TERM 3
DEFINITION 3 1 adds 'string' as a label to the x-axis on a plot 2 adds 'string' as a label to the y-axis on a plot TERM 4
DEFINITION 4 1 adds a grid to graph, or toggles grid on or off 2 turns the grid on 3 turns the grid off TERM 5
DEFINITION 5 pauses the execution of the program, allowing the user to view the graph
1 determines which figure will be used(changes current figure) 2 Makes # the current figure TERM 7
DEFINITION 7 1 freezes the current plot, so that an additional plot can be overlaid(toggles hold on/off) 2 holds the plot 3 releases the plot TERM 8
DEFINITION 8 syntax for plotting x-y graph with certain line, mark and color options ex. a dashed(--) green line(g) with the points circled(o). Line Types: - solid : dotted -. dash-dot -- dashed TERM 9
DEFINITION 9 when this command is used without inputs, it freezes the axis at the current configurations. Executing the function a second time returns axis control to MATLAB. The input to this command must be a four element vector that specifies the minimum and maximum values for both the x- and y-axes ex: [xmin,xmax,ymin,ymax] TERM 10
DEFINITION 10 allows you to add a legend to your graph. the legend shows a sample of the line and lists the string you have specified.
1generates an x-y plot using a logarithmic scale for x 2generates an x-y plot using a logarithmic scale for y TERM 17
DEFINITION 17 generates a plot of the vectors x and y using a logarithmic scale for both x and y TERM 18
DEFINITION 18 creates a histogram graph for data in x when n is specified creates histogram with n number of "bins" TERM 19
DEFINITION 19 generates a graph with two y-axes, the one on the left for the first set of ordered pairs, and the one on the right for the second set of ordered pairs. TERM 20
DEFINITION 20 1 allows you to plot a function without defining arrays of corresponding x and y values 2 same but you can define 'string' as the function ex. 'sin(x)'
creates a 3 dimensional line plot TERM 22
DEFINITION 22 generates an animated version of plot TERM 23
DEFINITION 23 creates a meshed surface plot TERM 24
DEFINITION 24 creates a surface plot, similar to mesh function TERM 25
DEFINITION 25 interpolates between the colors used to illustrate surface plots