没有合适的资源?快使用搜索试试~ 我知道了~
首页Maple_programmingGuide
Maple_programmingGuide
5星 · 超过95%的资源 需积分: 45 23 下载量 89 浏览量
更新于2023-03-16
1
收藏 15.16MB PDF 举报
这是一本相当好的Maple编程书,从介绍最新版本的maple15基本功能到编程,该书介绍详细且画面清晰,是一本很难得的maple教材!
资源详情
资源推荐
Maple Programming Guide
L. Bernardin
P. Chin
P. DeMarco
K. O. Geddes
D. E. G. Hare
K. M. Heal
G. Labahn
J. P. May
J. McCarron
M. B. Monagan
D. Ohashi
S. M. Vorkoetter
Copyright © Maplesoft, a division of Waterloo Maple Inc.
2011
Maple Programming Guide
by L. Bernardin, P. Chin, P. DeMarco, K. O. Geddes, D. E. G. Hare, K. M. Heal, G. Labahn,
J. P. May, J. McCarron, M. B. Monagan, D. Ohashi, and S. M. Vorkoetter
Copyright
Maplesoft, Maple, MapleNet, MaplePrimes, Maplet, Maple T.A., and OpenMaple are all trademarks of Waterloo
Maple Inc.
© Maplesoft, a division of Waterloo Maple Inc. 1996-2011. All rights reserved.
No part of this book may be reproduced, stored in a retrieval system, or transcribed, in any form or by any means
— electronic, mechanical, photocopying, recording, or otherwise. Information in this document is subject to change
without notice and does not represent a commitment on the part of the vendor. The software described in this
document is furnished under a license agreement and may be used or copied only in accordance with the agreement.
It is against the law to copy the software on any medium except as specically allowed in the agreement.
Adobe and Acrobat are either registered trademarks or trademarks of Adobe Systems Incorporated in the United
States and/or other countries.
Java is a registered trademarks of Oracle and/or its afliates.
MATLAB is a registered trademark of The MathWorks, Inc.
Microsoft and Windows are registered trademarks of Microsoft Corporation.
NAG is a registered trademark of The Numerical Algorithms Group Ltd.
All other trademarks are the property of their respective owners.
This document was produced using a special version of Maple and DocBook.
Printed in Canada
ISBN 978-1-926902-08-1
Contents
Preface ....................................................................................................... xxi
1 Introduction to Programming in Maple .............................................................. 1
1.1 In This Chapter ...................................................................................... 1
1.2 The Maple Software ................................................................................ 1
The User Interface .................................................................................. 1
The Computation Engine .......................................................................... 1
1.3 Maple Statements ................................................................................... 2
Getting Help .......................................................................................... 2
Displaying a Text String ........................................................................... 2
Performing an Arithmetic Operation ........................................................... 3
Assigning to a Name ............................................................................... 3
Using Maple Library Commands .............................................................. 3
1.4 Procedures ............................................................................................ 4
Dening a Simple Procedure ..................................................................... 4
Entering a Procedure Denition ................................................................. 4
Adding Comments to a Procedure .............................................................. 7
Calling a Procedure ................................................................................. 8
Maple Library Commands, Built-In Commands, and User-Dened Proced-
ures ....................................................................................................... 8
Full Evaluation and Last Name Evaluation .................................................. 9
Viewing Procedure Denitions and Maple Library Code ............................... 10
1.5 Interrupting Computations and Clearing the Internal Memory ........................ 11
Interrupting a Maple Computation ............................................................ 11
Clearing the Maple Internal Memory ........................................................ 12
1.6 Avoiding Common Problems ................................................................... 12
Unexpected End of Statement .................................................................. 12
Missing Operator .................................................................................. 13
Invalid, Wrong Number or Type of Arguments ........................................... 14
Unbalanced Parentheses ......................................................................... 14
Assignment Versus Equality .................................................................... 14
1.7 Exercises ............................................................................................. 16
2 Maple Language Elements ............................................................................ 17
2.1 In This Chapter ..................................................................................... 17
2.2 Character Set ....................................................................................... 17
2.3 Tokens ................................................................................................ 18
Reserved Words .................................................................................... 18
Programming-Language Operators ........................................................... 19
Names ................................................................................................ 22
2.4 Natural Integers .................................................................................... 23
2.5 Strings ................................................................................................ 24
Length of a String ................................................................................. 24
iii
Substrings ............................................................................................ 24
Searching a String ................................................................................. 25
String Concatenation ............................................................................. 25
Mutability of Strings .............................................................................. 26
Special Characters in Strings ................................................................... 27
Parsing Strings ..................................................................................... 27
Converting Expressions to Strings ............................................................ 28
2.6 Using Special Characters ........................................................................ 29
Token Separators .................................................................................. 29
Blank Spaces, New Lines, Comments, and Continuation ............................... 29
Punctuation Marks ................................................................................ 30
Escape Characters ................................................................................. 33
2.7 Types and Operands .............................................................................. 34
DAGs ................................................................................................. 34
Maple Types ........................................................................................ 35
Operands and op ................................................................................... 36
2.8 Avoiding Common Problems ................................................................... 40
Attempting to Assign to a Protected Name ................................................. 40
Invalid Left-Hand Assignment ................................................................. 41
Incorrect Syntax in Parse ........................................................................ 41
White Space Characters within a Token ..................................................... 41
Incorrect Use of Double and Single Quotes ................................................ 41
Avoid Using Maple Keywords as Names ................................................... 42
2.9 Exercises ............................................................................................. 43
3 Maple Expressions ....................................................................................... 45
3.1 In This Chapter ..................................................................................... 45
3.2 Introduction ......................................................................................... 45
Expressions and Statements .................................................................... 45
Automatic Simplication and Evaluation ................................................... 45
Syntax and Constructors ........................................................................ 45
3.3 Names ................................................................................................ 47
Creating Names: Lexical Conventions ....................................................... 48
3.4 Unevaluated Expressions ........................................................................ 52
Protecting Names and Options ................................................................. 53
Generic Expressions .............................................................................. 54
Pass by Reference ................................................................................. 54
Displaying the Original Command ............................................................ 55
Unassigning Names ............................................................................... 55
Evaluation and Automatic Simplication ................................................... 56
Example: Dening a Procedure that Is Returned Unevaluated ........................ 57
3.5 Numbers ............................................................................................. 59
Integers ............................................................................................... 59
Fractions ............................................................................................. 60
iv • Contents
Floats .................................................................................................. 61
Complex Numbers ................................................................................ 65
3.6 Indexed Expressions .............................................................................. 69
3.7 Member Selection ................................................................................. 74
3.8 Functions ............................................................................................ 75
Calls to Procedures ................................................................................ 77
3.9 Arithmetic Expressions .......................................................................... 77
Arithmetic Operators ............................................................................. 77
Noncommutative Multiplication ............................................................... 90
Factorials ............................................................................................. 92
Forming Sums and Products .................................................................... 93
3.10 Boolean and Relational Expressions ........................................................ 94
Boolean Constants ................................................................................. 94
Boolean Operators ................................................................................. 94
Relational Operators .............................................................................. 98
Efcient Boolean Iteration .................................................................... 102
3.11 Expressions for Data Structures ............................................................ 103
Sequences .......................................................................................... 103
Lists .................................................................................................. 105
Sets .................................................................................................. 107
Tables ............................................................................................... 107
Rectangular Tables .............................................................................. 108
3.12 Set-Theoretic Expressions ................................................................... 109
Membership ....................................................................................... 110
Set Inclusion ....................................................................................... 110
Other Binary Operators for Sets ............................................................. 111
3.13 Other Expressions .............................................................................. 113
Functional Operators ............................................................................ 113
Composition ....................................................................................... 114
Neutral Operators ................................................................................ 116
Ranges .............................................................................................. 116
The Concatenation Operator .................................................................. 119
The Double Colon Operator ................................................................... 121
Series ................................................................................................ 122
3.14 Attributes ......................................................................................... 124
3.15 Using Expressions ............................................................................. 126
Evaluating and Simplifying Expressions .................................................. 126
Substituting Subexpressions .................................................................. 127
Structured Types ................................................................................. 130
3.16 Exercises ......................................................................................... 134
4 Basic Data Structures ................................................................................. 135
4.1 In This Chapter ................................................................................... 135
4.2 Introduction ....................................................................................... 135
Contents • v
剩余703页未读,继续阅读
galileobc
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 彩虹rain bow point鼠标指针压缩包使用指南
- C#开发的C++作业自动批改系统
- Java实战项目:城市公交查询系统及部署教程
- 深入掌握Spring Boot基础技巧与实践
- 基于SSM+Mysql的校园通讯录信息管理系统毕业设计源码
- 精选简历模板分享:简约大气,适用于应届生与在校生
- 个性化Windows桌面:自制图标大全指南
- 51单片机超声波测距项目源码解析
- 掌握SpringBoot实战:深度学习笔记解析
- 掌握Java基础语法的关键知识点
- SSM+mysql邮件管理系统毕业设计源码免费下载
- wkhtmltox下载困难?找到正确的安装包攻略
- Python全栈开发项目资源包 - 功能复刻与开发支持
- 即时消息分发系统架构设计:以tio为基础
- 基于SSM框架和MySQL的在线书城项目源码
- 认知OFDM技术在802.11标准中的项目实践
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功