ENGR 101 Lecture Notes - Lecture 5: Polar Coordinate System, Pie Chart, Bar Chart
Document Summary
Plotting data in matlab to plot data use the function plot(x,y) X is a vector of x values. Y is a vector of y values x=1:0. 1:10 y=x. ^2-10. You can print your graph by using the menus or by typing print to output your graph to a . png file you can use the command prin(filename, -dpng") where filename is a string. Multiple data sets can be plotted on the same graph x=0:0. 1:10; y1=x. ^2-10. *x; plot(x,y1,x,y2); to distinguish between the two plots you can enter codes to set the line color, style, and marker style. Multiple data sets can be plotted on the same graph. Here one will be red and dot dashed and the other will be blue and marked with circles legend is created with the legend function. Don"t forget to add labels to your axes. Matlabs default font size for axis labels is tiny! use this command to increase font size.