Đang chuẩn bị liên kết để tải về tài liệu:
Lecture note Data visualization - Chapter 21
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
The main contents of the chapter consist of the following: Script m-file, editor/debugger window, cell mode, using built-in functions, using the HELP feature , window HELP screen, elementary math functions, rounding functions, discrete mathematics, trigonometric function, data analysis function. | Lecture note Data visualization - Chapter 21 Lecture 21 Recap Script M file Editor Debugger Window Cell Mode Chapter 3 Built in MATLAB Function Using Built in Functions Using the HELP Feature Window HELP Screen Elementary Math Functions Rounding Functions Sums and Products Sorting Values Matrix Size Variance and Standard Deviation Normal Distribution Random Numbers Random numbers are often used in engineering calculations to simulate measured data Measured data rarely behave exactly as predicted by mathematical models so we can add small values of random numbers to our predictions to make a model behave more like a real system Random numbers are also used to model games of chance Two different types of random numbers can be generated in MATLAB Uniform random numbers Gaussian random numbers Uniform Random Numbers Uniform random numbers are generated with the rand function. These numbers are evenly distributed between 0 and 1 We can create a set of random numbers over other ranges by modifying the numbers created by the rand function For example to create a set of 100 evenly distributed numbers between 0 and 5 first create a set over the default range with the command r rand 100 1 Example Continued . If we want to change the range to 5 to 10 we can add 5 to every value in the array r r 5 The result will be random numbers varying from 5 to 10. We can generalize these results with the equation x max min . random_number_set min Gaussian Random Numbers Continued . If we need a data set with a different average or a different standard deviation we start with the default set of random numbers and then modify it Since the default standard deviation is 1 we must multiply by the required standard deviation for the new data set Since the default mean is 0 we ll need to add the new mean x standard_deviation . random_data_set mean For example to create a sequence of 500 Gaussian random variables with a standard deviation of 2.5 and a Complex Numbers MATLAB includes several .