- 15
- 0
- 约1.57万字
- 约 97页
- 2020-08-21 发布于湖北
- 举报
95503統資軟體課程講義Maple Procedures 指導教授:蔡桂宏 博士 學生 :熊承慧 學號 :AGENDA Difference Main Topic Execution Group Procedures Parameter, Local, Global variables Execution vs. Procedure Use the Procedure Maple function=procedure AGENDA Anonymous procedures Procedures data structures Procedure data structure Remember tables Recursion procedures Skills to create procedure execution group Difference Underlying Idea Maple expression~~ data structure Maple function~~ procedure Initial Definition Data structure~~ a collection of data Procedure~~ a collection of instructions Main Topic Know the meaning of a collection of instructions How to turn a collection of instructions into a procedure Know a procedure is more than a collection of instructions How mathematical functions can be represented by Maple procedures How procedures can manipulate data structures Execution Group Procedures Execution Group Procedures Execution Group Procedures Execution Group Procedures Execution Group Procedures Parameter, Local, Global variables plus := proc(x,y) local a, b; global c; a := x - y; b := x * y; c := x ^ y; x + y; # the return value end; Parameter, Local, Global variables local variables only live inside the procedure call. global variables inside procedure bodies are really the same as the variables we use in commands at our worksheet prompts. Parameter, Local, Global variables plus( 2, 5 ); Execution vs. Procedure ex2 find the i th digit (from the right) of an integer put commands in an execution group n := 200!: i := 50: 10^(-i)*n: moves the decimal point to the left of the ith digit of frac( % ): get the fractional part of the last result 10*%: moves the decimal point over to the right one place trunc( % ); truncates off the fractional part of the last result leaving us with just the digit we want Execution vs. Procedure put commands into the body of a procedure get
您可能关注的文档
最近下载
- 中国五声性调式和声研究 樊祖荫.pdf
- 2026中共曲靖市麒麟区委国有企业工作委员会曲靖市麒麟区区属国有企业招聘15人备考题库参考答案详解.docx VIP
- 旅游景区毕业论文景区游客满意度.doc VIP
- 2026届上海市浦东新区高三一模语文试卷及答案.doc VIP
- 2026中共曲靖市麒麟区委国有企业工作委员会曲靖市麒麟区区属国有企业招聘15人备考题库及参考答案详解.docx VIP
- DB34T 4180-2022农村公益性公墓建设规范.docx VIP
- 旅游景区游客满意度调查及提升策略研究--以乌镇为例.docx VIP
- 2026中共曲靖市麒麟区委国有企业工作委员会曲靖市麒麟区区属国有企业招聘15人备考题库及一套完整答案.docx VIP
- 2025年江苏省扬州市中考数学真题试卷含答案.pdf VIP
- 电磁场仿真软件:CST Microwave Studio二次开发_(12).VBA脚本开发.docx VIP
原创力文档

文档评论(0)