Lecture note Data visualization - Chapter 22
Số trang: 21
Loại file: pptx
Dung lượng: 1.17 MB
Lượt xem: 20
Lượt tải: 0
Xem trước 3 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
In this lecture we learned about: Sum and product functions, matrix size function, variance and standard deviation, random numbers, complex numbers, computational limitations, general mathematical functions, rounding functions, functions used in discrete mathematics, trigonometric functions.
Nội dung trích xuất từ tài liệu:
Lecture note Data visualization - Chapter 22 Lecture 22 Recap Sum and Product Functions Matrix Size Function Variance and Standard Deviation Random Numbers Complex Numbers Computational Limitations MATLAB includes functions to identify the largest real numbers and the largest integers the program can process Special Values and Functions Summary of Chapter General mathematical functions, such as exponential functions logarithmic functions roots Rounding functions Functions used in discrete mathematics, such as factoring functions primenumber functions Trigonometric functions, including Continued…. Data analysis functions, such as maxima and minima averages (mean and median) sums and products sorting standard deviation and variance Randomnumber generation for both uniform distributions Gaussian (normal) distributions Chapter 5 Plotting TwoDimensional Plots The most useful plot for engineers is the x–y plot A set of ordered pairs is used to identify points on a two dimensional graph; the points are then connected by straight lines The values of x and y may be measured or calculated Generally, the independent variable is given the name x and is plotted on the x axis, and the dependent variable is given the name y and is plotted on the y axis Simple xy Plots Once vectors of x values and y values have been defined, MATLAB makes it easy to create plots Suppose a set of time versus distance data were obtained through measurement We can store the time values in a vector called x and the distance values in a vector called y : x = [0:2:18]; y = [0, 0.33, 4.13, 6.29, 6.85, 11.19, 13.19, 13.96, 16.33, 18.17]; Continued…. To plot these points, use the plot command, with x and y as arguments: plot(x,y) A graphics window automatically opens, which MATLAB calls Figure 1 Titles, Labels and Grids Good engineering practice requires that we include axis labels and a title in our plot The following commands add a title, x and y axis labels, and a background grid: plot(x,y) xlabel('Time, sec') ylabel('Distance, ft') grid on Continued…. As with any MATLAB commands, they could also be combined onto one or two lines, separated by commas: plot(x,y) , title('Laboratory Experiment 1') xlabel('Time, sec' ), ylabel('Distance, ft'), grid Multiple Plots If you are working in an Mfile when you request a plot, and then you continue with more computations, MATLAB will generate and display the graphics window and then return immediately to execute the rest of the commands in the program If you request a second plot, the graph you created will be overwritten There are two possible solutions to this problem: Use the pause command to temporarily halt the execution of your Mfile program so that you can examine the figure Continued…. The pause command stops the program execution until any key is pressed If you want to pause for a specified number of seconds, use the pause(n) command, which will cause execution to pause for n seconds before continuing The figure command allows you to open a new figure window The next time you request a plot, it will be displayed in this new window Continued…. For example: figure(2) opens a window named “Figure 2,” which then becomes the window used for subsequent plotting Executing figure without an input parameter causes a new window to open, numbered consecutively one up from the current window For example: if the current figure window is named “Figure 2,” executing figure will cause “Figure 3” to open
Nội dung trích xuất từ tài liệu:
Lecture note Data visualization - Chapter 22 Lecture 22 Recap Sum and Product Functions Matrix Size Function Variance and Standard Deviation Random Numbers Complex Numbers Computational Limitations MATLAB includes functions to identify the largest real numbers and the largest integers the program can process Special Values and Functions Summary of Chapter General mathematical functions, such as exponential functions logarithmic functions roots Rounding functions Functions used in discrete mathematics, such as factoring functions primenumber functions Trigonometric functions, including Continued…. Data analysis functions, such as maxima and minima averages (mean and median) sums and products sorting standard deviation and variance Randomnumber generation for both uniform distributions Gaussian (normal) distributions Chapter 5 Plotting TwoDimensional Plots The most useful plot for engineers is the x–y plot A set of ordered pairs is used to identify points on a two dimensional graph; the points are then connected by straight lines The values of x and y may be measured or calculated Generally, the independent variable is given the name x and is plotted on the x axis, and the dependent variable is given the name y and is plotted on the y axis Simple xy Plots Once vectors of x values and y values have been defined, MATLAB makes it easy to create plots Suppose a set of time versus distance data were obtained through measurement We can store the time values in a vector called x and the distance values in a vector called y : x = [0:2:18]; y = [0, 0.33, 4.13, 6.29, 6.85, 11.19, 13.19, 13.96, 16.33, 18.17]; Continued…. To plot these points, use the plot command, with x and y as arguments: plot(x,y) A graphics window automatically opens, which MATLAB calls Figure 1 Titles, Labels and Grids Good engineering practice requires that we include axis labels and a title in our plot The following commands add a title, x and y axis labels, and a background grid: plot(x,y) xlabel('Time, sec') ylabel('Distance, ft') grid on Continued…. As with any MATLAB commands, they could also be combined onto one or two lines, separated by commas: plot(x,y) , title('Laboratory Experiment 1') xlabel('Time, sec' ), ylabel('Distance, ft'), grid Multiple Plots If you are working in an Mfile when you request a plot, and then you continue with more computations, MATLAB will generate and display the graphics window and then return immediately to execute the rest of the commands in the program If you request a second plot, the graph you created will be overwritten There are two possible solutions to this problem: Use the pause command to temporarily halt the execution of your Mfile program so that you can examine the figure Continued…. The pause command stops the program execution until any key is pressed If you want to pause for a specified number of seconds, use the pause(n) command, which will cause execution to pause for n seconds before continuing The figure command allows you to open a new figure window The next time you request a plot, it will be displayed in this new window Continued…. For example: figure(2) opens a window named “Figure 2,” which then becomes the window used for subsequent plotting Executing figure without an input parameter causes a new window to open, numbered consecutively one up from the current window For example: if the current figure window is named “Figure 2,” executing figure will cause “Figure 3” to open
Tìm kiếm theo từ khóa liên quan:
Data visualization Lecture note Data visualization Data structures Data Visualization with C Data visualization with matlab Effective graphical displayGợi ý tài liệu liên quan:
-
Trực quan hóa dữ liệu: Vai trò & thử thách
10 trang 35 0 0 -
Ebook Management support systems: Part 2 - Dr. Kamlesh Lakhwani
136 trang 30 0 0 -
Ebook Eloquent JavaScript - A modern introduction to programming: Part 1
199 trang 30 0 0 -
Lecture Introduction to computing systems (2/e): Chapter 19 - Yale N. Patt, Sanjay J. Patel
28 trang 26 0 0 -
Ebook Introduction to algorithms (3rd edition)
1313 trang 24 0 0 -
Lecture Data structures and algorithms: Chapter 1 - Introduction
41 trang 24 0 0 -
335 trang 21 0 0
-
169 trang 21 0 0
-
Lecture Data Structures: Lesson 41
18 trang 20 0 0 -
Ebook Introduction to algorithms (Second Edition)
429 trang 19 0 0