2)常用操作: Expand、 Factor、 Together、Part Simpl fy、 Collect、 Coefficient Exponent 四、序列及其操作 1.序列的定义 2.序列的生成: Table函数 3.序列的操作
(2) 常用操作: Expand、Factor、Together、Part Simplify、Collect、Coefficient、 Exponent 四、序列及其操作 1. 序列的定义 2. 序列的生成:Table函数 3. 序列的操作
(1)添加删除: Append、 Prepend、 Insert Delete、 Delete Cases (2)取元素:Part、Take、Drop、 Select (3)检测: Length、 Count、 Position 五、表达式“头”的概念: Head及 ApplyI函数
(1) 添加删除:Append、Prepend、Insert、 Delete、DeleteCases (2) 取元素:Part、Take、Drop、Select (3) 检测:Length、Count、Position 五、表达式“头”的概念: Head及Apply函数
自定义函数 1.一元函数 例 e Clear[f xI f[x]:=x^2+4x-2 2.多元函数 例:£【x,y]:=x^2+y~2-3 3.迭代函数 例:£[n]:=£[n-1]+[n-2]; f[0]=1;f[1]=1;
六、自定义函数 1. 一元函数 例: Clear[f,x] f[x_]:= x^2+4x-2 2. 多元函数 例: f[x_,y_]:= x^2+y^2-3 3. 迭代函数 例:f[n_]:= f[n-1]+f[n-2]; f[0]= 1; f[1]=1;
第二章编程语言 1·条件语句 ◆逻辑判断符
1· 条件语句 ◆ 逻辑判断符 == >= <= > < != === =!= 第二章 编程语言
◆逻辑运算符 !‖&& ◆/;运算符 x=a/ test 仅当test为True时才执行赋值语句 ◆If语句 法: If test,then,else 若test为True,则执行then,若test为 False,则执行else
◆ 逻辑运算符 ! || && ◆ /;运算符 x = a /;test 仅当test为True时才执行赋值语句 ◆ If 语句 语法:If [test, then, else] 若test为 True,则执行then,若test为 False,则执行else