当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

延安大学:《数字信号处理》课程PPT教学课件(DigitalSignal Processing,DSP)Programming with MATLAB

资源类别:文库,文档格式:PPT,文档页数:57,文件大小:240KB,团购合买
MATLAB® is a high-level language that includes matrix-based data structures, its own internal data types, an extensive catalog of functions, an environment in which to develop your own functions and scripts, the ability to import and export to many types of data files, object-oriented programming capabilities, and interfaces to external technologies such as COM, Java, programs written in C and Fortran, and serial port devices.
点击下载完整版文档(PPT)

补充内容 Programming with MATLAB

Programming with MATLAB 补充内容:

Introduce MATLAB is a high-level language that includes matrix-based data structures, its own internal data types, an extensive catalog of functions, an environment in which to develop your own functions and scripts, the ability to import and export to many types of data files, object-oriented programming capabilities, and interfaces to external technologies such as COM, Java, programs written in C and Fortran, and serial port devices

Introduce MATLAB® is a high-level language that includes matrix-based data structures, its own internal data types, an extensive catalog of functions, an environment in which to develop your own functions and scripts, the ability to import and export to many types of data files, object-oriented programming capabilities, and interfaces to external technologies such as COM, Java, programs written in C and Fortran, and serial port devices

Introduce This lecture presents the MATLAB programming features and techniques in the following chapters ● Data Structures ● Data Types O Basic Program Components M-File Programming

Introduce This lecture presents the MATLAB programming features and techniques in the following chapters: ⚫Data Structures. ⚫Data Types. ⚫Basic Program Components. ⚫M-File Programming

Data Structures The most basic data structure in MATLAB is the matrix MATLAB uses these two-dimensional matrices to store single numbers and linear series of numbers as well. In these cases, the dimensions are 1-by-1 and 1-by-n respectively, where n is the length of the numeric series MATLAB also supports data structures that have more than two dimensions These data elements can be numbers characters logical states of true or false, or even other MATLAB structure types

Data Structures MATLAB uses these two-dimensional matrices to store single numbers and linear series of numbers as well. In these cases, the dimensions are 1-by-1 and 1-by-n respectively, where n is the length of the numeric series. The most basic data structure in MATLAB® is the matrix. These data elements can be numbers, characters, logical states of true or false, or even other MATLAB structure types. MATLAB also supports data structures that have more than two dimensions

1-1 Creating Matrice Method 1: Constructing a Simple matrix The simplest way to create a matrix in MATLAB is to use the matrix constructor operator, [ Create a row in the matrix by entering elements(shown as E below) within the brackets. Separate each element with a comma or space roW=[E1,E2,…,.m] roW=[E1E2…Em

1-1 Creating Matrice The simplest way to create a matrix in MATLAB is to use the matrix constructor operator, []. Create a row in the matrix by entering elements (shown as E below) within the brackets. Separate each element with a comma or space: row = [E1, E2, ..., Em] row = [E1 E2 ... Em] Method 1: Constructing a Simple Matrix

1-1 Creating Matrice For example, to create a one row matrix of five elements, type A=[126293-822] A=[126293-822;162874391;-417-72956 A 126293-822 162874391 417-72956 Note that all rows must have the same number of elements

1-1 Creating Matrice A = 12 62 93 -8 22 16 2 87 43 91 -4 17 -72 95 6 For example, to create a one row matrix of five elements, type A = [12 62 93 -8 22]; Note that all rows must have the same number of elements. A = [12 62 93 -8 22; 16 2 87 43 91; -4 17 -72 95 6]

1-1 Creating Matrice Method 2: Specialized Matrix Functions MATLAB has a number of functions that create different kinds of matrices. Some create specialized matrices like the hankel or vandermonde matrix The functions shown in the table below create a matrices for more general use

1-1 Creating Matrice MATLAB has a number of functions that create different kinds of matrices. Some create specialized matrices like the Hankel or Vandermonde matrix. Method 2: Specialized Matrix Functions The functions shown in the table below create a matrices for more general use

Function Description ones Create a matrix or array of all ones zeros Create a matrix or array of all zeros eve Create a matrix with ones on the diagonal and zeros elsewhere accumarray Distribute elements of an input matrix to specified locations in an output matrix also allowing for accumulation diag Create a diagonal matrix from a vector magIc Create a square matrix with rows, columns, and diagonals that add up to the same number rand Create a matrix or array of uniformly distributed random numbers randn Create a matrix or array of normally distributed random numbers and arrays randperm Create a vector(1-by-n matrix)containing a random permutation of the specified integers

Function Description ones Create a matrix or array of all ones. zeros Create a matrix or array of all zeros. eye Create a matrix with ones on the diagonal and zeros elsewhere. accumarray Distribute elements of an input matrix to specified locations in an output matrix, also allowing for accumulation. diag Create a diagonal matrix from a vector. magic Create a square matrix with rows, columns, and diagonals that add up to the same number. rand Create a matrix or array of uniformly distributed random numbers. randn Create a matrix or array of normally distributed random numbers and arrays. randperm Create a vector (1-by-n matrix) containing a random permutation of the specified integers

The first example is A= zeros(1, 6) A 0 0 0 The second example is magic that create a magic Square Matrix A= magic(5) A 17241815 23571416 46132022 101219213 11182529

The first example is A = zeros(1, 6) A = 0 0 0 0 0 0 The second example is magic that create a Magic Square Matrix. A = magic(5) A = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9

1-1 Creating Matrice Method 3: Concatenating Matrices Matrix concatenation is the process of joining one or more matrices to make a new matrix. The brackets l operator discussed earlier in this section serves not only as a matrix constructor, but also as the MATLAB concatenation operator The expression C=[AB] horizontally concatenates matrices A and B. The expression C= [A; B] vertically concatenates them

1-1 Creating Matrice The expression C = [A B] horizontally concatenates matrices A and B. The expression C = [A; B] vertically concatenates them. Method 3: Concatenating Matrices Matrix concatenation is the process of joining one or more matrices to make a new matrix. The brackets [] operator discussed earlier in this section serves not only as a matrix constructor, but also as the MATLAB concatenation operator

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共57页,可试读19页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有