MATLAB讲义 (北京师范大学)第一章 (2学时) MATLAB语言入门.pdfVIP

  • 25
  • 0
  • 约4.34千字
  • 约 14页
  • 2017-11-13 发布于浙江
  • 举报

MATLAB讲义 (北京师范大学)第一章 (2学时) MATLAB语言入门.pdf

§2.1 Operators Expressions use familiar arithmetic operators and precedence rules + - * .* ^ .^ \ .\ / ./ + Addition + Addition - Subtraction - Subtraction * Multiplication .* Element-by-element / Division multiplication \ Left division (described ./ Element-by-element division in “Linear Algebra” in the .\ Element-by-element left MATLAB documentation) division ^ Power .^ Element-by-element power §2.1 Operators • Relational operators == ~= = = • Logical operators | ~ §2.2 Numbers computation Ⅰ、Variables: Variable names consist of a letter, followed by any number of letters, digits, or underscores. MATLAB distinguishes between uppercase and lowercase letters. A and a are not the same variable. §2.2 Numbers computation Several special functions provide values of useful constants: ans:absent variable name i、j :Imaginary unit pi:ratio of the circumference of a circle to its diameter inf:Infinity NaN:Not-a-Number §2.3 Generating Vectors Ⅰ. Enter an explicit list of elements [ ] using space、comma or semicolon to separate space、comma for row semicolon for coloum Ⅱ. The Colon Operator : x=x0 : step : xn t = 12: -2 :3 t = 12 10 8 6 4 Ⅲ. Generate equally spaced points • Linearly equally spaced points y=linspace(x1,x2,n) row vector,y(1)=x1, y(n)=x2 • Logarithmically equally spaced points y=logspace(x1,x2,n) y(1)=10^x1, y(n)=10^x2

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档