下载此文档

实验二 MATLAB基础知识(二).doc


文档分类:高等教育 | 页数:约7页 举报非法文档有奖
1/7
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/7 下载此文档
文档列表 文档介绍
Experiment 1. Fundamental Knowledge of Matlab (II) 【 Experimental P urposes 】 1 、熟悉并掌握 MATLAB 的工作环境。 2 、运行简单命令,实现数组及矩阵的输入输出,了解在 M ATLAB 下如何绘图。【 Experimental P rinciple 】 1. Vectors Let's start off by creating something simple, like a vector. Enter each element of the vector (separated bya space) between brackets, and set it equal toa variable. For example, to create the vector a, enter into the mand window (you can "copy" and "paste" from your browser into MATLAB to make it easy): a= [12345698 7] MATLAB should return: a=123456987 To generate a series that does not use the default of incrementing by 1, specify an additional value with the colon operator (first:step:last). In between the starting and ending value isa step value that tells MATLAB how much to increment (or decrement, if step is negative) between each number it generates. To generate a vector with elements between 0 and 20, incrementing by2 (this method is frequently used to create a time vector) , use t= 0:2:20 t=02468 10 12 14 16 18 20 Manipulating vectors is almost as easy as creating them. First, suppose you would like to add 2 to each of the elements in vector 'a'. The equation for that looks like: b=a+2b=345678 11 109 Now suppose, you would like to add two vectors together. If the two vectors are the same length, it is easy. Simply add the two as shown below: c=a+bc=468 10 12 14 20 18 16 Subtraction of vectors

实验二 MATLAB基础知识(二) 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数7
  • 收藏数0 收藏
  • 顶次数0
  • 上传人yzhfg888
  • 文件大小71 KB
  • 时间2017-02-24