roots Syntax
Descriptionr = roots(c) returns a column vector whose elements are the roots of the polynomial c. Row vector c contains the coefficients of a polynomial, ordered in descending powers. If c has n+1 components, the polynomial it represents is c1xn+c2x (n-1)+…+cn-1+1. >> c=[ 1 2 3] c =
1 2 3
>> roots(c)
ans =
-1.0000 + 1.4142i -1.0000 - 1.4142i exp exp
Exponential
SyntaxY = exp(X)
DescriptionThe exp function is an elementary function that operates element-wise on arrays. Its domain includes complex numbers. Y = exp(X) returns the exponential for each element of X
log %(注意MATLAB里log是ln的意思) log Natural
logarithm SyntaxY = log(X)
DescriptionThe log function operates element-wise on arrays. Its domain includes complex and negative numbers, which may lead to unexpected results if used unintentionally. Y = log(X) returns the natural logarithm of the elements of X.
>> exp(log(1))
ans =
1
3.MATLAB 中基本的赋值语句为: (1) 形式一:变量名=表达式 将表达式的结果赋... matlab 简明实例教程 72页 1下载券 matlab基本语法 81页 免费 matlab基本语法...
Matlab绘图教程(大量实例... 50页 1下载券matlab...otherwise 语句组n end 4.2 MATLAB的基本语法 4.2.3.3 While语句 while语句...
第二章 MATLAB语言基本语法_计算机软件及应用_IT/计算机_专业资料。第二章 ...otherwise 语句组n 语句组 end n=input('n='); switch n, case 0, Disp...
第 2 章 MATLAB的基本语法 MATLAB中有趣的演示实例 ? ? ? ? ? ? graf2d ...otherwise 语句组n end 第 2 章 MATLAB的基本语法 2.3.3 While语句 while...
matlab基本语法_工学_高等教育_教育专区。matlab基本...[n,m]=size(fb2) 语句 size 检查矩阵阶数,两... matlab 简明实例教程 72页 1下载券 MATLAB语法及...
? ? Matlab中的变量或常量都代表矩阵,标量看作 1×1阶的矩阵 赋值语句:变量=...除plot等基本绘图命令外,Matlab系统提供 了许多其它特殊绘图函数,这里举一些代 ...
4.0.2 MATLAB的基本语法_理学_高等教育_教育专区。数学建模4.0.2 MATLAB的基本语法一、数值、变量和表达式 数值、 MATLAB语句形式: 语句形式: 语句形式 变量=...
(-2.3)); %命令不被执行 §2.4 MATLAB 的基本语句结构字符串举例: >> A= 'China ''中国''' >> B='我是好学生' >> c='I am fine.' >> s3...
Matlab 入门基本语法,代码,例子 1. 编程简单使用方便 MATLAB 的基本数据单元是...[n,m]=size(fb2) x=[-1 0 1]; y=x-1 语句 size 检查矩阵阶数,两...
绘图 6. M文件和程序调试 作业 MATLAB语句形式 >>变量=表达式;%注释 = 将...例子:为说明指数的点运算,考虑计算2.^j。其中 j=1,2,…,8。程序为: x=...
热门文档