Presentation is loading. Please wait.

Presentation is loading. Please wait.

MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time.

Similar presentations


Presentation on theme: "MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time."— Presentation transcript:

1 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time Versus Distance Created in MATLAB ®.

2 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.2 Adding a grid, a title, and labels makes a plot easier to interpret.

3 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.3 The graphics window opens on the top of the command window. You can resize it to a convenient shape, or dock it with the MATLAB ® desktop.

4 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table 5.1 Basic Plotting Functions

5 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.4 The hold on command can be used to layer plots onto the same figure.

6 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.5 Multiple plots on the same graph.

7 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.6 The peaks function, plotted with a single argument in the plot command.

8 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.7a Complex numbers are plotted with the real component on the x-axis and the imaginary component on the y-axis when a single array is used as input.

9 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.7b When two complex arrays are used in the plot function, the imaginary components are ignored.

10 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table 5.2 Line, Mark, and Color Options

11 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.8a Adjusting the line, mark, and color style.

12 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.8b Multiple plots with varying line styles and point styles.

13 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table 5.3 Axis Scaling and Annotating Plots

14 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.9 Final version of the sample graph, annotated with a legend, a text box, a title, x and y labels, and a modified axis.

15 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.10 A sketch of the predicted equation behavior.

16 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.11 A plot of the Clausius–Clapeyron equation.

17 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.12 The range is zero, if the cannon is perfectly vertical or perfectly horizontal.

18 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.13 The predicted range of a projectile.

19 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.14 Subplots are used to subdivide the figure window into an m × n matrix.

20 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.15 The subplot command allows the user to create multiple graphs in the same figure window.

21 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.16 A polar plot of the sine function.

22 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.3 continued on next slide

23 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.3 (continued) continued on next slide

24 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.3 (continued) continued on next slide

25 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.3 (continued) continued on next slide

26 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.3 (continued)

27 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table 5.4 Rectangular and Logarithmic Plots

28 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.17 Linear and logarithmic plots, displayed using the subplot function.

29 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.18 Diffusivity data plotted on different scales. The data follows a straight line when the log 10 of the diffusivity is plotted on the y-axis vs. the inverse temperature on the x-axis.

30 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.4 continued on next slide

31 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.4 (continued) continued on next slide

32 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.4 (continued) continued on next slide

33 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.4 (continued) continued on next slide

34 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Practice Exercises 5.4 (continued) continued on next slide

35 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table 5.5 Bar Graphs and Pie Charts

36 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.19 Sample bar graphs and pie charts. The subplot function was used to divide the window into quadrants.

37 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.20 Histogram of grade data. a) Results from the hist function b) Results using histc to control the bin definition

38 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.21 Histograms and line plots are two different ways to visualize numeric information.

39 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.22 MATLAB ® allows the y-axis to be scaled differently on the left-hand and right-hand sides of the figure. a) Both lines were drawn using the same scaling. b) The sine curve was drawn using the scaling on the left axis, while the exponential curve was drawn using the scaling on the right axis.

40 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.23 The plotyy function can generate several types of graphs, including semilogx, semilogy, and loglog.

41 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.24 Sketch of the predicted data behavior.

42 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table 5.6 Group I Elements and Selected Physical Properties

43 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.25 In the left-hand figure, the two sets of values were plotted using the same scale. Using two y-axes allows us to plot data with different units on the same graph, as shown in the right-hand figure.

44 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.26 Function plots do not require the user to define arrays of ordered pairs.

45 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table 5.7 Three-Dimensional Plots

46 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.27 A three-dimensional plot of a spring. MATLAB ® uses a coordinate system consistent with the right- hand rule.

47 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.28 Simple mesh created with a single two-dimensional matrix.

48 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.29 Mesh and surf plots are created with three input arguments.

49 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.30 Surface and contour plots are different ways of visualizing the same data.

50 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.31 A variety of contour plots is available in MATLAB ®.

51 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.32 MATLAB ® offers interactive tools, such as the insert tool, that allow the user to adjust the appearance of graphs.

52 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.33 MATLAB ® allows you to edit plots by using commands from the toolbar.

53 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.34 Edited plot of a sphere.

54 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.35 Plotting from the workspace window, using the interactive plotting feature.

55 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure P5.11a A tensile testing machine is used to measure stress and strain and to characterize the behavior of materials as they are deformed.

56 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure P5.11b A tensile testing machine is used to measure stress and strain and to characterize the behavior of materials as they are deformed.

57 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table P5.11 Tensile Testing Data

58 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table P5.19 Exponential Increase in Transistor Count on Integrated Circuits continued on next slide

59 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Table P5.19 (continued) Exponential Increase in Transistor Count on Integrated Circuits

60 MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure P5.30 Tornado plot.


Download ppt "MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time."

Similar presentations


Ads by Google