mathcad-培训教材

合集下载

Mathcad2001-数学运算-向量和矩阵解读

Mathcad2001-数学运算-向量和矩阵解读
图 25
其 中 的 “ Select a component to insert” 列 表 框 中 列 有 八 个 选 项 , 常 用 的有Excel(输入Excel文件)、File Read or Write(读入数据文件或输出数据文件) 和Input Table(输入表)。前二项的使用 方法基本相同,用户只需逐次单击 “Next”按钮,便可完成数据文件的输 入。如选择“File Read or Write”项 后单击“Next”按钮,在下一对话框中 选择 “read from a file (读入数据
1.向量和矩阵
(1)创建向量和矩阵
在Mathcad2001中,根据线性代数的习 惯把单个变量称为标量,把包含多个变 量的一列变量称为向量,而把包含多列 的向量称为矩阵,向量和矩阵又合称为 数组。
创建向量和矩阵有下列几种方法:
(1)使用“Insert”菜单中的“Matrix” 命令,或单击“Matrix”工具面板中的 “ ”按钮,或按Ctrl+M键,将打开 如图24所示的“Insert Matrix”对话框。
求矩阵的逆:若
, C 3 4 2 1 5 6

0.141 0.03 9 0.222
C 1 0.162 0.394
0.111
0.111 0.333 0.111
求矩阵各个向量对应的实部和虚部:
1 2
Re(A) 2 6
0 5
Im(B)4Fra bibliotek36 1
8
2
在Mathcad2001中,共提供与向量和矩阵有 关的内置函数39个,其中常用的有:
diag(v):返回一个对角矩阵,对角元素 为向量v。 geninv(A):返回矩阵A的逆矩阵。 rref(A):返回矩阵A的阶形矩阵。 tr(M):求矩阵斜对角线元素之和(迹)。 rank(A):求矩阵A的秩。 eigenvec(M,z):求矩阵M特征值z的特征 向量。 eigenvals(M):求矩阵M的特征值。

CAD简单培训教材PPT课件

CAD简单培训教材PPT课件

五. CAD图形尺寸标注
第23页/共27页
六. 习题
请大家根据以下条件和要求绘制照明布置平面示意图
条件: 1、车间尺寸72米×27米,梁距6米。 2、采用深照型投光灯,每根梁3盏灯均布。 3、深照型投光灯图例为:
要求: 1、标注车间尺寸 2、可以根据图纸确定灯具位置 3、用“引线标注”表明灯具为NTC9810高顶灯
删除 镜 像 阵列
旋转
拉伸 修剪 打断于点 倒角 分解
or
复制 偏移
移动 缩放
延伸 打断 圆角
第11页/共27页
四. CAD基本图形编辑
1、删除、复制、镜像
删除、复制、镜像
2、偏移、阵列
偏移、阵列
将选中的图元按矩形或环形的 排列方式大量拷贝。单击“阵列” 按钮,系统弹出“阵列”对话框, AutoCAD提供了矩形阵列和环形 阵列两种方式。
第24页/共27页
六. 练习
最终成图参考:
第25页/共27页
第26页/共27页
谢谢您的观看!
第27页/共27页
第20页/共27页
五. CAD图形尺寸标注
第21页/共27页
图单 击 “ 新 建 ” 选 项 。 可 得 到 下
五. CAD图形尺寸标注
单击“继续”按钮,系统弹出下图所示的“新建标注样式”对话 框。该对话框中共有直线和箭头、文字、调整、主单位、换算单 位以及公差6个选项卡,可以分别完成尺寸界线、尺寸线、尺寸 数字、尺寸标注形式以及公第差22形页式/共2的7页设置。
• 1.窗口控制按钮 • 2.下拉菜单栏 • 3.浮动工具条 • 4.绘图区 • 5.命令提示窗口 • 6.状态栏
第2页/共27页
标准工具条 对象特性工具条 下拉菜单栏 窗口控制按钮

CAD制图培训教材(共-36张)

CAD制图培训教材(共-36张)

绘 直 线
命令行: Line(L) 菜 单: [绘图]→[直线(L)] 工具栏: [绘图]→[直线] 命令选项 角度(A): 指直线与UCS的X轴的夹角 长度(L): 指两点之间的距离 跟踪(F): 跟踪最近画过的线或弧终点的切线方向,以便沿着这个方向继续画线 闭合(C): 将第一条直线段的起点和最后一条直线段的终点连接起来,形成一个封闭区域 撤销(U): 撤消最近绘制的一条直线段。重新输入U,点击【回车键】,则重新指定新的终点
图形绘制
编辑对象
区域填充
绘图工具
图层线型
绘制文字
尺寸标注
阵 列
命令行: Array(AR) 菜 单: [修改]→[阵列(A)] 工具栏: [修改]→[阵列] 复制选定对象的副本,并按指定的方式排列,输入命令后,对话框如下:
复 制
命令行: Copy(CP&CO) 菜 单: [修改]→[复制选择(Y)] 工具栏: [修改]→[复制对象] 复制当前选取的对象,作用同Ctrl+C
绘 圆
命令行: Circle(C) 菜单: [绘图]→[圆(C)] 工具栏: [绘图]→[圆] 命令选项 两点(2P): 通过指定圆直径上的两个点绘制圆 三点(3P): 通过指定圆周上的三个点来绘制圆 T(切点、切点、半径): 通过指定相切的两个对象和半径来绘制圆 弧线(A): 将选定的弧线转化为圆 多次(M): 选择“多次”选项,将连续绘制多个相同设置的圆 常输入C后,点击鼠标左键,选择输入半径来绘圆
绘图工具
图层线型
绘制文字
尺寸标注
绘 射 线
命令行: Ray 菜 单: [绘图]→[射线(R)] 命令选项 等分(B): 垂直于已知对象或平分已知对象绘制等分射线 水平(H): 平行于当前UCS 的X 轴绘制水平射线 竖直(V): 平行于当前UCS 的Y 轴绘制垂直射线 角度(A): 指定角度绘制带有角度的射线 偏移(P): 以指定距离将选取的对象偏移并复制,使对象副本与原对象平行 主要用于绘制时进行比对和平移等,使用较少

mathcad14新手入门专用简明教程(最新整理)

mathcad14新手入门专用简明教程(最新整理)

去第一章 Mathcad简介Mathcad即数学CAD,是美国Mathsoft公司于1986年推出的一个可视化的处理数学问题的软件包。

其早期版本运行于DOS下,直到4.0版才运行于Windows环境下。

Mathcad早期版本一直偏爱于数值计算,直到6.0版,才引入符号计算功能,不过符号计算,并不是Mathcad的强项,它不如我们下面将要介绍的另外两个数学软件包。

其程序设计功能,也是6.0版后才有的功能,但在Mathcad中进行程序设计,却与其它编程语言有着本质的不同,其语言简单明了,可视化强,近似于其它程序的流程图。

Mathcad不但是一个超级的数学计算器,而且还是一个出色的数学公式编辑器。

只要你用过Word的Eqation,你就会发现用Mathcad 的数学公式编辑器输入一个数学公式有多么的简单。

另外,Mathcad也称得上是一个优秀的文本编辑器,目前国际上很多科技论文,就是用Mathcad排版打印的。

在Mathcad中,你能够进行有关高等数学、线性代数、数值分析、概率统计等方面的各种运算,并且能够绘制常用的数学图形。

它还为工程应用提供了各种量纲的转换。

下面以Mathcad7 Professional为基础,简要介绍Mathcad的使用方法。

1.1 Mathcad的集成环境与基本操作在安装完Mathcad7后,单击“开始→程序→mathcad7→Mathcad 7 Professional”即可进入Mathcad7,下面是Mathcad的用户界面。

可以看出,Mathcad的界面与我们常用的软件如Office系列软件很相似。

它含有9个主菜单,即文件管理(File)、编辑(Edit)、视图(View)、插入(Insert)、格式(Format)、数学计算(Math)、符号计算(Symbolics)、窗口管理(Window)、帮助(Help),每个菜单可以直接单击打开,也可以同时按ALT和菜单上的下划线字母,如ALT+O。

Mathcad2001-基本操作(课堂PPT)

Mathcad2001-基本操作(课堂PPT)

十字丝向右移动一格 插入一个空格
改变编辑线控制范围
向上或下卷动 80%的窗口高度显示,光标位置不动
显示到前一页或下一页结束
5
2.区域编辑
6
(1)区域的选取
7
单击区域,或用鼠标拖拉圈住区域即 可选取一个区域,而单击区域外空白处 则可取消该区域的选取。要选取多个区 域,可用鼠标拖拉圈住所有区域;或按 住Ctrl键的同时逐个单击其它区域,当 按住Ctrl键同时再次单击已选取的某个 区域则可取消对该区域的选取;如果单 击第一个区域,然后在按住Shift键的同 时再单击第二个区域,将选取这两个区 域之间的所有区域。
则进入,十字丝将变 一字符或上下移动
成文本播插入符或公 一行
字符或上下移动
式编辑线
把插入线上或下移
同↑或↓
动一行,并选择新老 从上或下方移出区域
位置之间的内容
3
移动键 Shift+ ← 或 → C trl+ ↑ 或 ↓ C trl+ ← 或 →
在空白处 同←或→
同↑或↓ 同←或→
在文本区域中
在数学区域中
19
该区域锁定后自动隐藏。也可在锁定操作前, 使 用 “ Format” 菜 单 “ Area” 命 令 的 子 命 令 “Collapse”隐藏该区域内容。要恢复显示, 可单击分界线选中它,然后使用“Format”菜 单“Area”命令的子命令“Expand”。
要解除锁定,首先单击两条分界线之间的 任意位置,然后使用“Format”菜单“Area” 命令的子命令“Unlock”,如果含有密码的话, 系统将还要求用户输入密码才能解除锁定。只 有未锁定的分界线才能被删除,单击其中任意 一条分界线,使用“Edit”菜单中的“Cut” 或“Delete”命令即可。

CAD制图培训教材(共 36张PPT)

CAD制图培训教材(共 36张PPT)

命令选项
角度(A):指直线与UCS的X轴的夹角 长度(L):指两点之间的距离 跟踪(F):跟踪最近画过的线或弧终点的切线方向,
以便沿着这个方向继续画线
闭合(C):将第一条直线段的起点和最后一条直线 段的终点连接起来,形成一个封闭区域 撤销(U):撤消最近绘制的一条直线段。重新输入
U,点击【回车键】,则重新指定新的终点
工具栏:[绘图]→[构造线] 命令选项 等分(B):垂直于已知对象或平分已知对象绘制等 分构造线 水平(H):平行于当前UCS 的X 轴绘制水平构造线 竖直(V):平行于当前UCS 的Y 轴绘制垂直构造线 角度(A):指定角度绘制带有角度的构造线 偏移(P):以指定距离将选取的对象偏移并复制, 使对象副本与原对象平行 用处广泛,需养成习惯经常使用,能让自身形成 良好的绘图习惯
两点(2P):通过指定圆环宽度和直径上两点的方
法画圆环 三点(3P):通过指定圆环宽度及圆环上三点的方 式画圆环
T(切点、切点、半径):通过与已知对象相切
的方式画圆环 圆环体内径:指圆环体内圆直径 圆环体外径:指圆环体外圆直径
绘制圆环时,主要参数是圆心、内直径和外直径。
如内直径为0,则为填充环;如两者相等,则为圆
绘 圆
命令行:Circle(C)
菜单:[绘图]→[圆(C)]
工具栏:[绘图]→[圆] 命令选项 两点(2P):通过指定圆直径上的两个点绘制圆 三点(3P):通过指定圆周上的三个点来绘制圆 T(切点、切点、半径):通过指定相切的两个对 象和半径来绘制圆 弧线(A):将选定的弧线转化为圆 多次(M):选择“多次”选项,将连续绘制多个相 同设置的圆 常输入C后,点击鼠标左键,选择输入半径来绘圆
图形绘制
编辑对象

【精品】《Mathcad应用》课程教学大纲.doc

【精品】《Mathcad应用》课程教学大纲.doc

《Mathcad应用》课程教学大纲课程编号0103606501826115课程名称(中文)Mathcad应用(英文)Application of Mathcad software课程基本情况1.学分:2+2学时:60 (课内学时:20 实验学时:40 )2.课程性质:专业课3.适用专业:理学适用对象:本科生4.先修课程:《高等数学》、《windows95操作基本知识》5.首选教材:《Mathcad 2000实例教程》黄亮等编中国电力出版社2000.8 二选教材:参考书目:《Mathcad7. 0入门及工程应用》宋征等编人民邮电出版社1999.126.考核形式:上机7.教学环境:课堂与机房课程教学目的及要求教学目的及要求:主要介绍目前非常流行的数学计算软件Mathcad专业版的使用方法。

详细介绍Mathcad软件的各种功能,如向量矩阵的计算、统计计算、图像处理、求解方程、符号的解析计算、编程等等。

要求学生通过学习掌握用Mathcad进行各种计算,二维,三维绘图,方程求解,函数拟合方法等基本操作。

了解:用Mathcad编程,制作动画和Mathconnex使用方法。

课程内容及学时分配(—)Mathcad 介绍(4 学时)1.Mathcad7. 0的特点及主要功能2.Mathcad操作界面3.Mathcad X作表处理重点:基本界面功能的了解(二)Mathcad使用基础(4学时)1.表达式和变量2.文本处理3.Mathcad的计算特点及计算控制4.向量矩阵5.Mathcad的运算符6.Mathcad中的单位和量纲重点:基本使用方法(三)使用Mathcad的函数库(2学时)1.内部函数A分2.计算方程的解析计算课程内容及学时分配4.计算方程的解析解5.矩阵的解析变换6.傅里叶变换、拉普拉斯变换及Z变换7.解析运算的最优化重点:Symbolics菜单的使用难点:操作中的各种规定(九)使用Mathcad编程(4学时)1.定义一个程序2.条件语句3.循环语句4.程序执行的流程控制5.程序之间的调用6.错误处理重点:怎样设置编程语句难点:如何编写(十)Mathcad高级实用技巧(8学时)1.Mathcad中的动画2.使用MathConnex软件3.在MathConnex中使用组件4.ConnexScript 语言参考重点:怎样实现动画,怎样使用MathConnex软件。

MathcadPrimerMathcad手册

MathcadPrimerMathcad手册

A Mathcad PrimerThis document will summarize many of the features of Mathcad 11 and how these features are used to solve physical chemistry problems. It is not a replacementfor the Mathcad Reference Guide by Mathsoft®.You need to enable Print Layout View in Word (View, Print Layout).You can CTRL-click any topic to go to any section or you can scroll down.ContentsThe Mathcad Window (2)Entering Text (3)Equations and Variables (3)Important Warning about Typical Scientific Symbols (6)Selecting and Editing (7)Variable Names (7)Units (8)Defining Your Own Units (9)Easy Graphs (10)Range Variables and Graphs (12)Zoom and Trace Functions in a Graph (14)Data and Data Files: Excel Data (15)Entering Data into Mathcad (16)Copying Data from EXCEL (18)Numerical Calculations (18)Numerical Roots of Equations (19)Symbolic Calculation (20)Symbolic Integration (21)The Assume Keyword (22)Partial Derivatives (23)Solving Equations (23)The Mathcad WindowWhen you start Mathcad, the screen should appear as shown below. A series of menu items are listed, and underneath the menu are toolbars. An ancillary toolbarcalled Math appears to the right. In this document, menu commands will be noted as Item 1, item 2, and so forth. As an example, the print preview command would be typed as: File, Print Preview . To execute the command you would point to File, then select Print Preview from the drop-down list.If you do not see all the items in the graphic, go to View, Toolbars , and select the toolbars that you wish to see. Your first assignment is to check the various menu items to see what they contain.The page boundary shows you what will fit on a normal page when the document is printed. Material to the right of the boundary will print on the next page. Menu ItemsToolbars Math toolbarInsertion pointPage boundaryStyle boxThe toolbar under the menu is the Standard toolbar and contains icons for: New document, Open document, Save, Print, Print Preview, and so on. These icons have tooltips (little tags that inform you of their functions). If you forget what an icon does, hold the mouse pointer over it for a second and the tooltip will appear.Note the red crosshair in the document window. This is the insertion point in Mathcad and any typed information will appear at this point. Clicking the mouse in a new location moves the insertion point (try it!).Entering TextIn Mathcad, text is different from mathematics. Text information and math information have their separate fonts, colors, and styles. The formatting toolbar (the one right above the actual document) has a style box that informs you of the type of information that is being typed or selected in the document. The default style is variables so when you type, Mathcad assumes you are typing mathematics.If you wish to type text, first type a quotation mark, “. The qu ote opens a text region in Mathcad and you can type any text that you wish. Click anywhere outside the text region to stop.Any good Mathcad document should contain text to annotate and explain the calculations. You can, and should, change the appearance of text to distinguish it from math. You can do this by typing Format, Style. This brings up the format dialog box. To change the text font, choose Normal and click modify. Click thefont box and you may change the font style, size, and color. A good choice is to make text font a different color than the black font used for variables.Equations and VariablesMathematical expressions are typed in the usual way, using the +, –, /, and *keys for addition, subtraction, division, and multiplication. Exponents areentered with the ^ key. You must remember to include the multiplication symbol in all expressions. Mathcad will interpret xy as a new variable, and not as the product of x and y. Here we type 5*12= and you can see the result is 60. If wetype 512= Mathcad interprets the second statement as the number 512 as you can see from the result.⋅60=512=512512Forgetting the multiplication symbol (*) is the most common source of headachesfor Mathcad beginners.A convenient way to see multiplication is to go to Tools , Worksheet options ,Display . If you make the multiplication symbol a dot, large dot, or ⨯, it will be hard to miss.You must first define a variable before you use it in a calculation. In theexample below, x is not defined at the beginning and is highlighted by Mathcad in red (an error):25x ⋅-=x no result because x is not defined.x 14:=define x x 25x ⋅-126=result of functionTo define a variable, use the := operator. You enter this by typing a colon. The := is an assignment operator in Mathcad; it states that the variable on the left is assigned the value or expression on the right. You cannot define anexpression on the right side of this operator; 14 := sin(x) will produce an error.Some typical uses: Try the assignment operator by typing x:12.5 and observe theresult. Common mathematical functions can be found by using the function icon, f (x ) on the toolbar. Try defining a new variable to be the cosine of y and set y equal to 15.x 12.5:=w e assign x a value Sine sin x ():=We define Sine as sin(x)Sine 0.066-=We print SineTo evaluate an expression, use the “normal” equals sign just as you would in normal mathematics.y x ()27x 2⋅x +:=define a function x 12.5:=set x y x ()4222.286=evaluate y x 195:=set new x y x () 1.027106⨯=evaluate ya faster and easier approach; the function isalready defined as y(x) so w e can place anyvalue of x into the expressiony 12.5()4222.286=y 195() 1.027106⨯=Notice that the function is always on the left side of the assignment operator. An expression such as 12:x = makes no sense to Mathcad.Exercise: Define a variable to represent the distance as a function of time. Thedistance follows this expression: initial_position + 11.5*time + 1.2*time 2.Set the initial position to 255 and calculate the position at time = 2, 12, 25.Exercise: Harmonic motion follows a sinusoidal pattern:position = amplitude*sin(time) + phase.Define a variable to represent the position as a function of time when theamplitude is 1.5 and the phase is zero. Calculate the position at time = 0, 12, 24, 44.What change to position occurs if the phase changes?Important Warning about Typical Scientific SymbolsMathcad has a built-in set of units that are used for cancellation and obtaining the units of an answer. This is a very powerful concept but sometimes these units can cause confusion when you try to make them variables. A common example is g. We all like to use g for grams, but Mathcad has already defined this symbol as the acceleration due to gravity:This problem also occurs for T. We like to use T for temperature, but itrepresents Tesla, the built-in unit for magnetic flux density. You can use T in this manner: T = 325 K, where K is the symbol for kelvin temperature. Another problem exists for the letter e . We typically use e as the charge on an electron but in Mathcad, e represents the base of natural logarithms (e = 2.781828….).Mathcad also writes e as exp as in e x = exp(x). Do not use g for gramsAtom ic m ass of sulfur is 32 gram sm 32g⋅:=M athcad interprets g as 9.8 m/s 2m 313.813m s2=Not the m ass of sulfur!m 32gm⋅:=m 0.032kg =The correct answ er in kilogram s An alternative m ethodg gm :=Redefine g as gram sm 32g⋅:=m 0.032kg =The correct answ er in kilogram sSelecting and EditingMathcad expressions can be edited using the standard windows methods for cut, copy, and paste. Before editing part of an expression, the appropriate section must be selected. To select an area, click inside the expression; the red crosshair will become a blue selection cursor that looks like ⎦, or ⎣. The small “foot” on the cursor indicates which way the data will be selected. ⎣ will select to the right, while ⎦ will select to the left. Use the insert key to change the direction. The spacebar repeatedly expands the selection, and the → and ← keys move it right and left respectively. Try it on an expression to see how these keys workThe spacebar changes the selection by parts of an expression (pieces connected by +, –, *, /), while the arrows move character by character. It is easier toobserve than to explain. Build and expression such as 2():27y x x =+ and try it.Once a part of an expression is selected, you can cut it, delete it, or copy it. You can also edit it by substituting different operators. Text is edited in the same manner. Any selected item can be pasted into another document such as a Word document or an Excel spreadsheet. All of the Mathcad work in this primer was pasted directly from Mathcad into Word. Variable NamesMathcad allows almost any name for a variable as long as the name is not a predefined function. Some example variables are:x y velocity temperatu re initial_concVariable names can be any combination of alphanumeric characters. These names should begin with a letter and should not contain symbols except for theunderscore( _ ), percent ( % ), or a prime( ` ). You cannot use unit symbols or built-in functions as names (to see a list of built-in functions, click the f(x) on the toolbar). Some examples of variables are:This_is_a_variable okayMass_proton okayVariable_4 okayV okay1st _value invalid; begins with a number.Sin(X) invalid; sin is a built-in function.A list of predefined functions can be found by clicking the f(x) icon on the toolbar.As simple example of variables, we calculate P from the ideal gas law. Define some values and evaluate the pressure.V 12:=R 0.0821:=T 225:=n 2.5:=P n R ⋅T⋅V :=P 3.848=The variables are defined in the first line; P is then defined (as nRT/V) and evaluated. If any variable is left undefined, the undefined quantities will be in red (an error). In this example, we delete the definition for V, therefore P cannot be calculated.R 0.08205:=T 225:=n 2.5:=P n R ⋅T⋅:=V =PYou can put a subscript as part of a variable name by using the period character on the keyboard . If we type v.initial (that’s v period initial), we get initial v in the document. Subscripted variable names can be quite useful. UnitsBy default, Mathcad will use the SI unit system for all calculations. You canchange this in the Tools , Worksheet options , Display command. Go to the Units tab and choose a system of units or set it to none. You enter a unit for any quantity by multiplying a numerical value by the unit. If you want a volume of 15 liters, you type V:15*L. The previous gas law example, with units is:V 15L ⋅:=R 0.08205L atm ⋅molK ⋅⋅:=T 225K ⋅:=n 2.5mol ⋅:=P n R ⋅T⋅V :=P 3.118105⨯Pa =Mathcad automatically cancels units and produces the result in Pascals (the default SI unit for pressure). If you prefer a different unit for the result, click the expression and a black box will appear after the Pa unit. Double-click this box and a set of possible units will be shown; you can choose the units you want. Here we change the answer to atmospheres.P n R ⋅T⋅V :=P 3.077atm =An easy way to see the defined units in Mathcad is to click the measuring cup on the toolbar. Choose any type of quantity (length, mass, etc.) and Mathcad will display the possible units.Defining Your Own UnitsMathcad does not contain all possible units for all possible quantities. For example, Mathcad does not have picometers in its units database. You can define units such as picometers in your Mathcad document.Defining a unit in Mathcadpm 1012-m ⋅:=Note that it is 10–12 * m! Don’t forget the multiplication operator . Mathcad alsohas a table of reference data that contains physical constants. These data can be copied and pasted into any Mathcad document. Click the Resource center icon on the toolbar (it looks like a book); click on quicksheets and reference tables; click reference tables and then physical constants. The Resource center is also anexcellent source for help, and the quicksheets are quite useful to show you how to do certain calculations in Mathcad.When you use units in calculations, Mathcad checks the units and will not work with incompatible units. You will get an error message.R 0.08205L atm ⋅molK ⋅⋅:=V 15L⋅:=New_Vol :=V R +The bar is the preferred unit of pressure, but Mathcad does not have the bar in its units database. You must define it as we did for picometers earlier. Bydefinition: 1 bar ≡ 105 Pa.Easy GraphsMathcad has a method for developing an xy graph of any simple function. Toillustrate the method , let’s graph the sine of x. Start a new document and put the cursor where you want the graph. From the menu, choose Insert, Graph, XY Plot . You will see an empty graph with black boxes (placeholders). You can cycle throughType x in the placeholder on the x-axis and then type sin(x) in the box on the y-axis. The graph will change to:10010101sin x ()xMathcad makes a guess at the limits, in this case: –10 to +10.Plot the function 32415y x x =-+. From the menu, choose Insert, Graph, XY Plot . You will see an empty graph. Type x in the x-axis box, and type the expression, 32415x x -+, in the y-axis box:10010200010001000x 34x 2⋅-15+xOne more graph example. We can define a function and then graph it by placing thef(x) in the y-placeholder:f x ()7x ⋅0.25x ⋅+2-:=0510100102030f x ()xIf the range of values on the x or y axis is not appropriate, you can change them by clicking the graph. Values in placeholders will show for the maximum and minimum x and y ranges. In the example, the maximum y is 22.636.51010010203022.6362-f x ()100xClick inside any value and edit it to your liking. Here the maximum y has been changed to 10 and the maximum x to 5.02450510f x ()xIf you double-click the graph, a dialog box will open that allows you to change any properties of the graph including whether it will be displayed as lines,points, or a combination of both; the color of the lines, labels for the axes, and a graph title. For the title to show, you must be sure to check the show title box (don’t ask why).Range Variables and GraphsWhen we need to have numerous values for a variable in Mathcad, we use range variables. Range variables are also used to generate graphs of scientific data. A range variable is a variable that has different values based on an index. For example, we may have three different pressures: P1, P2, and P3 where P1 is 100 bar, P2 is 220 bar and P3 is 75 bar.In Mathcad, enter a range variable by typing the variable name, then type [ and then the index. The [ is a definition for a subscripted range variable. This is completely different than the subscripted variable we discussed earlier (obtain by using a period). As an example, let’s produce a set of pressures that go from 1 to 12 atm in unit steps. First we define the range, i.Type i:1;12 (that’s i colon 1 semicolon 12)Now define the pressures, type P[i := iYou should see:i112..:=P ii :=To see that this works, type P = to list the values of P.What if we did not want to increase the pressure in unit steps, but we want increase it by steps of 0.25 starting at 1? In this case, we need to defineanother variable. We cannot change th e range of i to be 1, 1.25, 1.50…because iis the index for P. We can have P1, P2, or P3, but we can’t have P1.25. One way around this problem is shown below. We define i and an increment that depends on i.i112..:=incrii0.25⋅:=P i1incri+:=The new range variable (incr) changes the increment values to 0.25 times the index.Suppose you want a range of x-data for a graph that starts at 12.5, increments at 0.01, and ends at 22. You enter this as: x colon 12.5 comma 12.51 semicolon 22.defining a rangexdata12.512.51,22..:=Note that the second number (12.51) is the next value in the sequence and it is not the increment to be added to the initial value.We can also produce variables that are functional forms. For instance, we can define a range of pressures and then define a variable such as V(P) that depends on the pressure range. This method of using range variables is shown next. In this example, we use the pressure itself as the range variable. We define thecompressibility in terms of both pressure and temperature, and that allows us the option of evaluating and plotting multiple functions simultaneously.Compressibility factors for ammonia as a VDW gasamm onia dataR 0.08205:=pressure range a 4.281:=p 15,500..:=b 0.037847:=Z as function of p for a van der Waals gas Z p T ,()11R T ⋅b aR T ⋅-⎛ ⎝⎫⎪⎭⋅p ⋅+a R 3T 3⋅2b ⋅a R T ⋅-⎛ ⎝⎫⎪⎭⋅p 2⋅+:=0100200300400500211Z p 1379,()Z p 300,()Z p 500,()pNote how Z(p,T). The pressure is defined in the range and we plot three different temperatures: 1379, 300, and 500 K. Multiple arguments on the y-axis are entered and separated with a comma. To enter these functions we would type: Z(p, 1379), Z(p, 300), Z(p, 500) into the y placeholder on the graph.Zoom and Trace Functions in a GraphMathcad has built-in zoom and trace capabilities for graphs as shown in the next figure. On a Mathcad document, reproduce the work to produce the previous graph. Right-click the graph and choose either Trace or Zoom from the context menu.Zoom: Move the Zoom dialog box to the side. Click and hold at the point in the graph that you wish to begin the Zoom; drag a rectangular box until it encompasses the region you wish. Finish by clicking Zoom or OK in the dialog box.Trace: Move the Trace dialog box to the side. Click anywhere in the graph; the points will show in the Trace box. If the Track Data Points box is checked, Mathcad will skip from one data point to the next. It will not provide data (interpolate) between the points.Data and Data Files: Excel DataMathcad data are held in arrays and arrays have a range associated with them.Often we need to get scientific data into or out of Mathcad. Fortunately, Mathcad has built-in functions for this. Data can usually be saved as a text (ASCII) file from another program (such as EXCEL). In this example, the data were saved from a Word file (Saved a text file, not as a Word document!). To read the data file, we first define a variable for the data. Usually we have x and y data so thisvariable will have two columns of data; this is called a matrix. A typical matrixof data is:371.2 4.9217To add our data to Mathcad, click the Insert Data File Input, and then choose the file format (usually Excel). Click Browse to find the data file. Then click finish. Put a variable name in the placeholder on the Mathcad screen and you're done. When done, you should have something like this:The variable PZ is defined as the data set given by the url, C:\..\co2.txt. The variable PZ contains the pressure and compressibility data for the gas. Toseparate the pressure and compressibility data, we extract the columns of the data matrix. P is in the first column (Mathcad labels it as zero) and thecompressibility is in the second column (Mathcad labels it as one). To extract each column use the Extract Column command from the matrix palette or use CTRL6. You need to type in the column number that you want to extract. We define P as the first column of our data matrix and z as the second column:P PZ 0〈〉:=z PZ 1〈〉:=Now we have two variables of data and we can work with them just as we did for any other range of data. A graph of the data is:z PZ1〈〉:=02004006000.40.60.8z PEntering Data into MathcadOften we need to enter data directly into Mathcad. Data are held in arrays and arrays have a range associated with them. First, define a range variable (j in this case).Then type P[j :Type in the first number followed by a comma; repeat for each number. The last line shows that P 3 does equal 7.j15.. :=Pj157912:=P 37 =Another method of entering data is to define a variable as a matrix. For example, we can define X as a matrix of five elements in this manner: Type X : to produce the assignment operator; then choose Insert , Matrix from the toolbar. In the X ⎝⎪⎪⎪⎪⎪⎭:=You can now type values into the matrix.Copying Data from EXCELThe easiest method to provide Mathcad with EXCEL data is to define a variable such as New_data (you can use any name you choose): Open EXCEL and highlight the data range in EXCEL.Copy the data. In Mathcad, place the cursor on the placeholder for New_data and choose Edit, Paste from the menu (or right-click and chose Paste ). The selected data will now be in Mathcad. You can set up x and y variables in Mathcad and then paste the x data from EXCEL and then select and paste the y data from EXCEL.Numerical CalculationsMathcad can solve many problems numerically using common algorithms. As you have already seen, numerical computations are trivial:Integrals are evaluated using a modified Romberg algorithm, a method that is 0x x 5⎛⎜⎠d 121.5=Numerical derivatives are also easily obtained:x 3:=x sin x ()d d 0.99-=Numerical Roots of EquationsRoots of equations can be obtained from the root function:root(f(x),x)The root function obtains roots by successive approximation and it needs aninitial guess for the root. This guess can be supplied after graphing the function and observing where the function crosses the x-axis. As an example, we will find the roots of: 32()317005f x x x x =--+.Roots of the equationf x ()x 331x 2⋅-700x ⋅-5+:=Graph the function to estimate roots. You w ill need toadjust the lim its on the x axis to see all the roots. A cubic equationshould have three roots (although some roots m ay be im aginary). I n thegraph, the three roots are easily seen. The roots are at -15, 0, and 45(all values are approxim ate).20020404.1042.10402.104f x ()xNow we can find the exact roots:Find the negative root:x 15-:=first guess a rootanswer root f x ()x ,():=answer 15.169-=Find the largest root:x 40:=first guess a root answer root f x ()x ,():=answer 46.162=Warning: Always graph the function or try many initial estimates to be sure you have the correct root.Exercise: Find the third root of the function.Mathcad can also find the roots by symbolic calculation. In this example, we use the same function, 32()317005f x x x x =--+, but we do not write it as adefinition (that is, we leave out the f (x ) part). Select any x in the expression, and then select Symbolics, Variable, Solvex 331x 2⋅-700x ⋅- 5.+15.168870576389592537-7.140599615767146722610-3⋅46.161729976773825390⎛ ⎝⎫⎪⎪⎪⎭Note the decimal point after the 5 in the expression. Without a decimal number, Mathcad will solve analytically without substituting numbers into the expression. For numerical problems, this can be cumbersome.Exercise: Remove the decimal point after the 5 and solve to see the result.Also, note that Mathcad provides all three roots by this method. Symbolic CalculationA powerful feature of Mathcad is the ability to do symbolic algebra and calculus. The commands are located in the Symbolics menu on the toolbar and also on the Symbolics palette (the graduation hat icon). Symbolic calculations can either be static or “live”. A live symbolic calculation is automatically updated when a change is made to the document; a static calculation is not updated. Static symbolic work is accomplished by using the commands on the symbolics menu; live symbolic calculation is accomplished using the symbolics equal sign, →.As an example, let’s find the derivative of sin(5x) using the st atic method. Type sin(5x) into a worksheet (don’t forget the * for multiplication), select the x, and then click Symbolics, Variable, Differentiate . The result, 5cos(5x) will appear below your expression. Another option can be set to improve readability. Click Symbolics, Evaluation Style , and check the box that says Show Comments . Repeat the sin(5x) example and note the difference.If we use live symbolics to perform the same derivative, we would first enter the derivative symbols from the calculus palette (the one with the integral). Fill inthe placeholders with sin(5x) and x. Type CTRL . (Control period) and you should see the live symbolics arrow (this is equivalent to an equals sign). Clickanywhere and the result, 5cos(5x) should appear. The difference in live symbolics is that any change is immediately reflected in the result. Change the 5 to 17 and observe.x sin 17x ⋅()dd 17cos 17x ⋅()⋅→Symbolic calculations from the menu do not update in this manner as you can show for yourself.Symbolic IntegrationSymbolic integration works in the same manner as differentiation. We can evaluate both definite and indefinite integrals. Use the integral symbol from the calculus palette.x sin x ()⎛⎜⎠d cos x ()-→15x sin x ()⎛⎜⎠d cos 5()-cos 1()+→note the change to num eric form at w hen w e use decimal digits1.05.0x sin x ()⎛⎜⎠d .256→Mathcad can also evaluate double and triple integrals: y x x y 2⋅⎛⎜⎜⎠d ⎛⎜⎜⎠d 16x 2⋅y 3⋅→andψr θ,φ,()e7-r⋅cos θ()⋅:=02π⋅φ0πθ0∞r ψr θ,φ,()2r 2⋅sin θ()⋅⎛⎜⎠d ⎛⎜⎠d ⎛⎜⎠d 11029π⋅→Recall that r 2sin θ()⋅ drd θd φis the volum e element in spherical coordinatesNotice that in the second example, the function was defined and then substituted into the integral.The Assume Keyword (Very Important)Sometimes, we know something about the problem that Mathcad does not know. Forinstance, the integral2ax e dx ∞--∞⎰is not defined for a < 0. If we put thisexpression into Mathcad, we get this result:This is Mathcad’s way of telling you it cannot evaluate the expression; theresult is the same as the original. We must inform Mathcad that a > 0, and we use the assume keyword for this. Write the integral and then press CTRL SHIFT . (Control shift, period, pressed simultaneously) to produce the symbolics equal sign and a placeholder. You can also use the → from the symbolics palette if you prefer. In the placeholder, type assume, a>0, then click outside the integral to see the result.∞-∞x ea -x2⋅⎛⎜⎜⎠d assume a 0>,π2 ⎝⎪⎭a 12⎛ ⎝⎫⎪⎭→Mathcad sometimes has problems with the assume command and multiple integrals.R Z r ,()2Z r ⋅a o-⎛ ⎝⎫⎪⎭e Z -r⋅⋅:=a o⎛⎛o ,02π⋅φ0πθ0∞r R Z r ,()2r 2⋅sin θ()⋅⎛⎜⎠d ⎜⎠d ⎜⎠d assume a 0>Z 0>,→The integral can be evaluated if it is written as a product of three integrals:Partial DerivativesMathcad easily evaluates partial derivatives. In fact, Mathcad always assumes it is taking the partial derivative.x x y ⋅∂∂y→Partial derivatives:define a function of x,y,zf x y ,z ,()5x 3⋅y 2⋅6z3⋅+:=partial derivative w ith respect to zz f x y ,z ,()∂∂18z2⋅→partial derivative w ith respect to y yf x y ,z ,()∂∂10x 3⋅y⋅→partial derivative w ith respect to xxf x y ,z ,()∂∂15x 2⋅y2⋅→The partial derivative symbol is obtained by Math , Options , Display , Derivative .Solving EquationsMathcad can symbolically solve a single equation for an unknown or it can solve a set of equations for multiple unknowns. These calculations are done in solve blocks , a construct that is defined in Mathcad by the words given and find . Asolve block always begins with the word given . This is followed by the equation or equations to be solved. The result is evaluated in the find command. Solve blockuse only the symbolics equal sign typed as CTRL =. It appears as a bold equal in the document. A typical example is:x x y ⋅d d y →find the m axim um in a functionR Z r ,()2Z r ⋅a o -⎛ ⎝⎫⎪⎭eZ -r⋅⋅:=a odefine a functionGiven Begin the solve blockthis is a symbolic equals sign typed by CTRL =rR Z r ,()dd 0Find r ()3a o Z⋅→End of solve block。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
13
Web 资源 /appserver/mkt/products/resource/mathcad.jsp
14
2.2 用户论坛
一,从“帮助”菜单选择“用户论坛”
二,浏览器
/go/mathsoft/collab/。 注册新用户名
3
1.1 Mathcad 工作区
4
“数学”工具栏中的每个按钮可打开另一个运算符 “标准”工具栏提供到许多菜单命令的快速访问。 或符号的工具栏。
“格式化”工具栏含有滚动列表和按钮来为等式和 文本指定字体特性。
*注意 可打开的工作表数量仅受限于可用的系统资源。
5
1.2 区域
概念: Mathcad 允许在工作表的任何一处输入等式、文本和图。每个等式、文本片断 或其他元素都是一个区域。Mathcad 工作表是此类区域的集合。
• 变量:针对数学区域中所有变量、字母和运算符。
• “常量”:针对数学区域中所有数字。 • 数学文本字体:针对图表中的标题和轴标签。
21
Eg:
22
十、保存保存数学样式
23
第 四 章 :值域变量及数组
• • • • • 创建数组 迭代计算 访问数组元素 显示数组 使用数组
24
4.1 创建数组
一、插入向量或矩阵:
例如,要输入 φ,则按下f [Ctrl] G。
18
3.2 构建表达式
三、插入运算符 1.单击空白区域并单击“计算器”工具栏上的 2. 在第一个占位符中输入 2。 3. 在第二个占位符中单击或按下 [Tab] 以移动蓝色编辑线,并输入 6。 4. 按 [=] 或单击“计算器”工具栏上 四、构建表达式 键入以下字符: 3/4+5^2= 在右边得到结果。 五、键入名称和数字
7
1.5 定义函数
要添加函数定义到工作表: 特殊:
1. 首先通过键入 d(t): 定义函数 d(t)
2. 键入此表达式完成定义:1600+acc/2[ 空格键]*t^2[Enter]
1.6 格式化结果
结果的显示形式,包括小数位数、指数符号的使用以及字尾补零等等。
8
Eg:
1.7 图形
创建基本图形
9
Tab键切换输入
二、增加或删除行、列
25
4.2 迭代计算
一,创建值域变量
,11 快捷键[;]
快捷键[;]
26
二、将矩阵作为数据表格输入
27
4.3 访问数组元素
一、访问行和列
二、更改数组原点
28
4.4 显示数组
一、Mathcad 自动将大于九行或九列的矩阵和向量显示为输出表格
29
4.5 使用数组
MathCad 14教程
Jack Lu
总 纲
第一章:Mathcad 入门
第二章:在线资源 第三章:使用数学表达式 第四章:值域变量及数组
第五章:使用文本
第六章:Mathcad 工作表 第七章:使用 Mathcad 进行计算 第八章:插入图形和其他对象
2
第一章:Mathcad 入门
• • • • • • Mathcad 工作区 区域 简单计算 定义和变量 图形 保存、打印和退出
3. 键入新的运算符。
20
3.4 数学样式
八、移动表达式的组成部分
Eg:cos(wt + x)+ sin(wt + x)
Ctrl+C Ctrl+V *如果需要移动的话可以选择后直接拖拉到需要的地方
九、数学样式:数学表达式配置特定的字体、字体大小、字体样式和效果以及颜色。 *(应用到所有变量) Mathcad 预定义的数学样式为:
默认输入是ห้องสมุดไป่ตู้字区
按空格键转成文本区 (不可逆)
19
或直接键入[+]。将出现带有两个占位符的加号。
的 以获取结果。
Insert键 (转换插入线位置)
3.3 编辑表达式
六、控制编辑线
空格键
范围不断增大,最终循环
七、替换运算符
1. 将编辑线置于运算符之后(紧临)。 2. 按 [Backspace]。出现运算符占位符。
16
第 三 章:使用数学表达式
• • • • 插入数学表达式 构建表达式 编辑表达式 数学样式
17
3.1 插入数学表达式
一、可以在 Mathcad 工作表中任意位置放置数学表达式 1. 单击以确定十字线位置。 2. 键入数字、字母和数学运算符,或通过单击 Mathcad 数学工具栏上的按钮来插入它们, 从而创建数学区域。 (在默认设置下,Mathcad 将在十字光标处所键入的任何内容当作数学表达式) 二、希腊字母 有两种方式输入希腊字母: 1,点击希腊字母图标 2,键入希腊符号的罗马等价符号然后按下[Ctrl] G
6
1.3 简单计算
1. 单击工作表。您将看见一个小十字线。
2. 键入 15 - 8 / 104.5 =。当键入等号或单击“计算器”
工具栏上的 时, Mathcad 将计算结果。
1.4 定义变量
键入冒号 [:] 或单击“计算器”工具栏上的 来插入定义符号 要定义 acc 为 –9.8,键入:acc:–9.8。
共享其它用户资源
15
技术支持
技术支持知识库包含常见问题、样本文件以及支持资源。这些在 Web 上发布于:
/go/mathsoft/support/kb/。
在 PTC 网站上的 Mathcad 下载
已注册用户可从站点 /go/mathsoft/mathcad_download 下载 更新、Mathcad 模块、电子书和其他有用的资源。
Eg:
“X-Y 绘图” 图标: 快捷键 [@ ]
10
格式化图形 操作:双击图形
*定义图形属性
11
第二章:在线资源
• Mathcad 资源 • 用户论坛 • 其它资源
12
2.1 Mathcad 资源
帮助:
• • • • Mathcad帮助 教程 参考表格 电子书
*电子书:可从网上下载免费资源。 可将电子书的资源直接复制到 Mathcad中(选定区域后Ctrl+C Ctrl+V)
创建一个新区域: 1. 单击工作表中任意空白区域。您将看见一个小十字线。所键入的任何内容都在十 字线处显示。 2. 如果要创建的区域是数学区域,则可以在十字线所在的任意位置开始键入。
(在默认设置下,Mathcad 将所键入内容当作数学内容。)
3. 要创建文本区域,从“插入”菜单选择“文本区域”或直接按下 [ “] 然后开始键 入。
相关文档
最新文档